/* Inquiry Form Section Styles */
/* Styles for the anonymous inquiry calculator on the landing page */

/* Section Container */
.inquiry-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    overflow-x: hidden;
    scroll-margin-top: 30px;
}

.inquiry-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.inquiry-section .section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 0.5rem;
}

.inquiry-section .section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary, #4a5568);
}

/* Container Layout */
.inquiry-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    justify-content: center;
}

/* Two-column layout when results are visible (collapses gracefully on narrow viewports) */
.inquiry-container.has-results {
    grid-template-columns: repeat(2, minmax(0, 600px));
}

/* Form Wrapper */
.inquiry-form-wrapper {
    max-width: 600px;
    width: 100%;
    justify-self: center;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    order: 1;
}

/* Contact Form Card - below form on desktop, after results on mobile */
.inquiry-container .contact-form-card {
    order: 2;
    max-width: 600px;
    width: 100%;
    justify-self: center;
}

/* Results Wrapper - right column on desktop */
.inquiry-results-wrapper {
    max-width: 600px;
    width: 100%;
    justify-self: center;
    position: sticky;
    top: 100px;
    animation: slideIn 0.4s ease-out;
}

/* Place results in right column spanning both rows when two-column layout is active */
.inquiry-container.has-results .inquiry-results-wrapper {
    grid-row: 1 / 3;
    grid-column: 2;
}

@media (max-width: 1024px) {
    .inquiry-section {
        padding: 2rem 1rem;
    }

    .inquiry-container {
        justify-content: stretch;
    }

    .inquiry-container.has-results {
        grid-template-columns: 1fr;
    }

    .inquiry-form-wrapper,
    .inquiry-container .contact-form-card,
    .inquiry-results-wrapper {
        max-width: 100%;
        width: 100%;
        min-width: 0;
        justify-self: stretch;
        overflow: hidden;
    }

    /* Mobile order: Form (1) → Results (2) → Contact (3) */
    .inquiry-form-wrapper {
        padding: 1.25rem;
        order: 1;
    }

    .inquiry-results-wrapper {
        order: 2;
        position: static;
    }

    /* Must match base rule specificity (.inquiry-container.has-results .inquiry-results-wrapper) */
    .inquiry-container.has-results .inquiry-results-wrapper {
        grid-row: auto;
        grid-column: auto;
    }

    .inquiry-container .contact-form-card {
        order: 3;
    }
}

/* Form Sections */
.inquiry-form .form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.inquiry-form .form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.inquiry-form .form-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 1.25rem;
}

.inquiry-form .form-section h3 .material-icons {
    color: var(--primary, #1976d2);
    font-size: 1.25rem;
}

/* Form Rows */
.form-row {
    margin-bottom: 1rem;
}

.form-row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row.two-col {
        grid-template-columns: 1fr;
    }
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary, #4a5568);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary, #1976d2);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid {
    border-color: #e53e3e;
}

/* Checkbox Groups */
.checkbox-group {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary, #1976d2);
}

.conditional-field {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.conditional-field label {
    display: block;
    margin-bottom: 0.5rem;
}

.conditional-field input {
    width: 100%;
}

/* Turnstile Section */
.turnstile-section {
    display: flex;
    justify-content: center;
    padding: 0;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

/* Dev mode Turnstile placeholder */
.turnstile-dev-placeholder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #e8f5e9;
    border: 2px dashed #4caf50;
    border-radius: 8px;
    color: #2e7d32;
    font-size: 0.9rem;
    font-weight: 500;
}

.turnstile-dev-placeholder .material-icons {
    font-size: 1.25rem;
}

/* Form Actions */
.form-actions {
    margin-top: 0.75rem;
}

.form-actions .btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-actions .btn .material-icons {
    font-size: 1.25rem;
}

/* Form Disclaimer */
.form-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary, #4a5568);
    line-height: 1.5;
}

.form-disclaimer .material-icons {
    font-size: 1rem;
    color: #718096;
    flex-shrink: 0;
}

/* Results Card */
.results-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.results-header {
    background: linear-gradient(135deg, var(--primary, #1976d2) 0%, #004ba0 100%);
    color: white;
    padding: 1.5rem;
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.results-body {
    padding: 1.5rem;
}

/* Results Sections */
.result-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.result-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.result-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 1rem;
}

.result-section h4 .material-icons {
    font-size: 1.1rem;
}

/* Result Items */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.result-item .label {
    font-size: 0.9rem;
    color: var(--text-secondary, #4a5568);
}

.result-item .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
}

.result-item.total {
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
    margin-top: 0.5rem;
}

.result-item.total .label,
.result-item.total .value {
    font-size: 1rem;
    font-weight: 700;
}

.result-item.highlight {
    background: #f0f9ff;
    margin: 0 -1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

/* ZUS Type Badge */
.zus-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e0f2fe;
    color: #0369a1;
}

/* ZUS Note (disclaimer for Maly ZUS Plus) */
.zus-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fef3c7;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #92400e;
    line-height: 1.4;
}

.zus-note .material-icons {
    font-size: 1rem;
    flex-shrink: 0;
}

/* PIT Comparison */
.pit-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
    overflow: hidden;
}

@media (max-width: 600px) {
    .pit-comparison {
        grid-template-columns: 1fr;
    }
}

.pit-option {
    padding: 0.75rem;
    border-radius: 8px;
    text-align: left;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    min-width: 0;
    overflow: hidden;
}

.pit-option.recommended {
    border-color: #10b981;
    background: #ecfdf5;
}

.pit-option .pit-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 0.4rem;
    text-align: center;
}

.pit-option .pit-badge {
    display: block;
    text-align: center;
    margin-bottom: 0.5rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    background: #10b981;
    color: white;
    border-radius: 4px;
}

.pit-option .pit-details {
    margin-top: 0.4rem;
}

.pit-option .pit-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px dashed #e2e8f0;
}

.pit-option .pit-row:last-child {
    border-bottom: none;
}

.pit-option .pit-row.net {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid #e2e8f0;
    border-bottom: none;
}

.pit-option .pit-row.net .pit-label {
    text-align: center;
}

.pit-option .pit-label {
    font-size: 0.65rem;
    color: var(--text-secondary, #4a5568);
    margin-bottom: 0.15rem;
}

.pit-option .pit-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    text-align: right;
    word-break: break-word;
}

.pit-option .pit-value.tax {
    font-size: 0.9rem;
    font-weight: 700;
}

.pit-option .pit-value-monthly {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary, #718096);
    margin-top: 0.1rem;
}

.pit-option.recommended .pit-value.tax {
    color: #059669;
}

.pit-option .pit-note {
    font-size: 0.6rem;
    color: var(--text-secondary, #718096);
    font-style: italic;
    text-align: center;
    line-height: 1.3;
    padding: 0.25rem 0;
}

/* Recommended Plan */
.recommended-plan {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
}

.recommended-plan h4 {
    justify-content: center;
    margin-bottom: 0.5rem;
}

.recommended-plan .plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary, #1976d2);
    text-transform: capitalize;
}

.recommended-plan .plan-reason {
    font-size: 0.85rem;
    color: var(--text-secondary, #4a5568);
    margin-top: 0.5rem;
}

/* VAT Status */
.vat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.vat-status.exempt {
    background: #fef3c7;
    color: #92400e;
}

.vat-status.active {
    background: #dbeafe;
    color: #1e40af;
}

.vat-status .material-icons {
    font-size: 1.25rem;
}

/* Results Footer */
.results-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.results-disclaimer {
    font-size: 0.75rem;
    color: var(--text-secondary, #4a5568);
    line-height: 1.5;
    margin: 0;
}

/* Contact Form Card */
.contact-form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.contact-form-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 0.5rem;
}

.contact-form-card > p {
    font-size: 0.9rem;
    color: var(--text-secondary, #4a5568);
    margin-bottom: 1.25rem;
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Contact Success */
.contact-success {
    text-align: center;
    padding: 2rem;
}

.contact-success .material-icons {
    font-size: 3rem;
    color: #10b981;
}

.contact-success h4 {
    justify-content: center;
    margin: 1rem 0 0.5rem;
}

.contact-success p {
    color: var(--text-secondary, #4a5568);
}

/* Loading State */
.inquiry-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.inquiry-form.loading #submitInquiry::after {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

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

/* Spinning icon for loading states */
.spin {
    animation: spin 0.8s linear infinite;
}

/* Error States */
.form-group.error input,
.form-group.error select {
    border-color: #e53e3e;
}

.form-group .error-message {
    color: #e53e3e;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
