/* Deal-by-Deal Pricing Tool Styles - Extends main site styles */

/* Inherit CSS variables from main site landing-style.css */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* Main container */
.pricing-tool-container {
    max-width: 800px;
    margin: 120px auto 60px;
    padding: 0 2rem;
    background: var(--white);
}

/* Header section */
.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: var(--white);
    border-radius: 16px 16px 0 0;
}

.pricing-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.pricing-header .subtitle {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.progress-indicator {
    margin: 1.5rem 0;
}

.step-text {
    display: block;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-blue);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Language selector */
.language-selector {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.language-selector label {
    font-weight: 600;
    margin-bottom: 0;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Content area */
.pricing-content {
    background: var(--white);
    padding: 3rem;
    border: 1px solid var(--border-color);
    border-top: none;
    min-height: 400px;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h2 {
    color: var(--dark-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.page-description {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Form styling */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    line-height: 1.4;
}

.required-asterisk {
    color: var(--error-red);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--white);
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-control.error {
    border-color: var(--error-red);
}

.form-control.required {
    border-left: 4px solid var(--primary-blue);
}

/* Select styling */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 16px;
    padding-right: 3rem;
    cursor: pointer;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23003d82' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
}

/* Radio button styling */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s, background-color 0.3s;
    cursor: pointer;
}

.radio-option:hover {
    border-color: var(--primary-blue);
    background-color: rgba(30, 64, 175, 0.02);
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.radio-option label {
    flex: 1;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    margin-bottom: 0;
}

.radio-option.selected {
    border-color: var(--primary-blue);
    background-color: rgba(30, 64, 175, 0.05);
}

/* Conditional fields */
.conditional-fields {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--accent-blue);
}

.conditional-fields h4 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

/* Error messages */
.error-message {
    color: var(--error-red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Consent section */
.consent-section {
    max-width: 600px;
    margin: 0 auto;
}

.consent-text {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-blue);
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.consent-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.consent-checkbox label {
    flex: 1;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1.5;
}

/* hCaptcha container */
.hcaptcha-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    min-height: 78px;
}

/* Summary section */
.summary-section {
    max-width: 700px;
    margin: 0 auto;
}

.summary-card {
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card h3 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.summary-table th,
.summary-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.summary-table th {
    font-weight: 600;
    color: var(--text-dark);
    background: var(--white);
}

.summary-table td {
    color: var(--text-light);
}

/* Pricing table */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pricing-table th,
.pricing-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.pricing-table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--text-dark);
}

.pricing-table .fee-amount {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1.125rem;
}

.pricing-table .total-row {
    background: rgba(30, 64, 175, 0.05);
    font-weight: 600;
}

.pricing-table .total-row .fee-amount {
    color: var(--dark-blue);
    font-size: 1.25rem;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    min-width: 120px;
}

.button:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
}

.button:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.button-sent {
    background: var(--success-green) !important;
    cursor: default !important;
    transform: none !important;
}

.button-sent:hover {
    background: var(--success-green) !important;
    transform: none !important;
}

.button-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.button-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* Pricing availability notice */
.pricing-availability-notice {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
}

/* Button icons */
.button svg {
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Disable scroll wheel on number inputs */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Navigation buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.navigation-buttons .button-group {
    display: flex;
    gap: 1rem;
}

/* Action buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.share-section {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.share-section h4 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.share-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.share-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Loading states */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .pricing-tool-container {
        margin: 60px auto 40px;
        padding: 0 1rem;
    }

    .pricing-header {
        padding: 1.5rem;
    }

    .pricing-header h1 {
        font-size: 2rem;
    }

    .pricing-content {
        padding: 2rem 1.5rem;
    }

    .navigation-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .navigation-buttons .button-group {
        width: 100%;
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .share-form {
        flex-direction: column;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .summary-table th,
    .summary-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.button:focus,
.form-control:focus,
.radio-option:focus-within,
.consent-checkbox:focus-within {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-family: inherit;
    font-size: 14px;
    animation: slideInRight 0.3s ease-out;
}

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

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

.toast-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .pricing-tool-container {
        margin: 0;
        max-width: none;
    }

    .navigation-buttons,
    .action-buttons,
    .hcaptcha-container,
    .toast-notification {
        display: none;
    }

    .pricing-header {
        background: var(--light-gray) !important;
        color: var(--text-dark) !important;
    }
}