/**
 * B2B Pricing Calculator Styles
 */

.chcrm-b2b-calculator {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.chcrm-calculator-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.chcrm-calculator-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    text-align: center;
}

.chcrm-calculator-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
}

.chcrm-calculator-form {
    display: grid;
    gap: 40px;
}

.chcrm-calculator-inputs {
    display: grid;
    gap: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.chcrm-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chcrm-input-group label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.chcrm-slider-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.chcrm-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.chcrm-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    transition: all 0.2s;
}

.chcrm-slider::-webkit-slider-thumb:hover {
    background: #005a87;
    transform: scale(1.1);
}

.chcrm-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.chcrm-slider::-moz-range-thumb:hover {
    background: #005a87;
    transform: scale(1.1);
}

.chcrm-number-input {
    width: 80px;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.chcrm-number-input:focus {
    outline: none;
    border-color: #0073aa;
}

.chcrm-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.chcrm-select:focus {
    outline: none;
    border-color: #0073aa;
}

.chcrm-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 16px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s;
}

.chcrm-checkbox-group label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.chcrm-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.chcrm-checkbox-group span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.chcrm-price-display {
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: #fff;
}

.chcrm-price-breakdown {
    margin-bottom: 20px;
}

.chcrm-price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.chcrm-price-line:last-child {
    border-bottom: none;
}

.chcrm-price-line.chcrm-subtotal {
    font-weight: 600;
    font-size: 16px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.chcrm-discount-line {
    color: #ffd700;
    font-weight: 600;
}

.chcrm-discount-value {
    color: #ffd700 !important;
}

.chcrm-discount-percent {
    font-weight: 700;
}

.chcrm-price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0 0;
    font-size: 24px;
    font-weight: 700;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.chcrm-total-value {
    font-size: 32px;
    animation: priceUpdate 0.3s ease;
}

@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.chcrm-contact-form {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.chcrm-contact-form h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 24px 0;
}

.chcrm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chcrm-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chcrm-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.chcrm-form-group input,
.chcrm-form-group select,
.chcrm-form-group textarea {
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s;
}

.chcrm-form-group input:focus,
.chcrm-form-group select:focus,
.chcrm-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.chcrm-form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.chcrm-form-submit {
    margin-top: 24px;
    text-align: center;
}

.chcrm-submit-btn {
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.chcrm-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.chcrm-submit-btn:active {
    transform: translateY(0);
}

.chcrm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chcrm-form-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.chcrm-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.chcrm-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .chcrm-calculator-container {
        padding: 24px;
    }

    .chcrm-calculator-title {
        font-size: 24px;
    }

    .chcrm-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chcrm-slider-container {
        grid-template-columns: 1fr;
    }

    .chcrm-number-input {
        width: 100%;
    }

    .chcrm-price-total {
        font-size: 20px;
    }

    .chcrm-total-value {
        font-size: 28px;
    }

    .chcrm-submit-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }
}

[data-theme="dark"] .chcrm-calculator-container {
    background: #2c3e50;
    color: #ecf0f1;
}

[data-theme="dark"] .chcrm-calculator-title {
    color: #ecf0f1;
}

[data-theme="dark"] .chcrm-calculator-inputs,
[data-theme="dark"] .chcrm-contact-form {
    background: #34495e;
}

[data-theme="dark"] .chcrm-input-group label,
[data-theme="dark"] .chcrm-form-group label,
[data-theme="dark"] .chcrm-contact-form h3 {
    color: #ecf0f1;
}

[data-theme="dark"] .chcrm-number-input,
[data-theme="dark"] .chcrm-select,
[data-theme="dark"] .chcrm-form-group input,
[data-theme="dark"] .chcrm-form-group select,
[data-theme="dark"] .chcrm-form-group textarea {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #4a5f7f;
}

[data-theme="dark"] .chcrm-checkbox-group label {
    background: #2c3e50;
    border-color: #4a5f7f;
    color: #ecf0f1;
}

.chcrm-discount-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ffd700;
    color: #333;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

.chcrm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.chcrm-stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chcrm-stat-icon {
    font-size: 48px;
}

.chcrm-stat-content {
    flex: 1;
}

.chcrm-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
    line-height: 1;
    margin-bottom: 8px;
}

.chcrm-stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chcrm-section {
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chcrm-section h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.chcrm-filters {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.chcrm-filters form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.chcrm-filters select,
.chcrm-filters input[type="search"] {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.chcrm-filters input[type="search"] {
    min-width: 250px;
}

.chcrm-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.chcrm-status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.chcrm-status-contacted {
    background: #fff3e0;
    color: #f57c00;
}

.chcrm-status-converted {
    background: #e8f5e9;
    color: #388e3c;
}

.chcrm-status-rejected {
    background: #ffebee;
    color: #d32f2f;
}
