@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f3f4f6; /* Modern subtle gray background */
    color: #111827;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.form-card {
    max-width: 600px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05); /* Softer, broader shadow */
    overflow: hidden;
    border: 1px solid #f3f4f6;
}

.form-header {
    background: #ffffff;
    padding: 2.5rem 2.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.form-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #111827;
    margin-bottom: 4px;
}

.form-header p {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.form-body {
    padding: 2rem 2.5rem 2.5rem;
}

/* New Pricing Info Note */
.info-note {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.info-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #374151;
}

.pricing-table td {
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pricing-table tr:last-child td {
    border-bottom: none;
}

.pricing-table .price-val {
    font-weight: 600;
    text-align: right;
    color: #111827;
}

/* Highlight the active tier subtly */
.pricing-table tr.active td {
    color: #15803d;
    font-weight: 600;
}

.info-subtext {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 8px;
}

.required-star {
    color: #ef4444;
}

input, select, textarea {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); /* subtle inset feeling */
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
}

/* SaaS style focus ring */
input:focus, select:focus, textarea:focus {
    border-color: #10b981; /* Emerald green */
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input[readonly] {
    background: #f9fafb;
    color: #4b5563;
    font-weight: 600;
    cursor: not-allowed;
}
input[readonly]:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

.row-duo {
    display: flex;
    gap: 1.5rem;
}

.row-duo .input-group {
    flex: 1;
}

/* Clean Total Preview */
.total-preview {
    background: #f0fdf4; /* Very light green */
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 18px 24px;
    margin: 1rem 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-left {
    display: flex;
    flex-direction: column;
}

.total-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #166534;
}

.total-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #14532d;
    letter-spacing: -0.5px;
}

.currency-symbol {
    font-size: 1.25rem;
    font-weight: 600;
    margin-right: 4px;
    color: #166534;
}

/* Toast Messages */
.toast {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.toast.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    display: flex;
}

.toast.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    display: flex;
}

.toast.loading {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    display: flex;
}

/* Modern Button */
.send-btn {
    width: 100%;
    background: #111827; /* Dark modern button */
    border: none;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.send-btn:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

.send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.footer-note {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .form-header {
        padding: 2rem 1.5rem 1.25rem;
    }
    .form-body {
        padding: 1.5rem;
    }
    .row-duo {
        flex-direction: column;
        gap: 0;
    }
}

/* Success Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(4px);
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.15);
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}

.modal-content p {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.modal-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
