/* ==========================================================================
   Premium Registration Form CSS (Stripe-Level Quality)
   ========================================================================== */

   :root {
    /* Colors */
    --clr-bg: #FAFAFA;
    --clr-surface: #FFFFFF;
    --clr-text-main: #111827;
    --clr-text-muted: #6B7280;
    --clr-border: #E5E7EB;
    --clr-primary: #0F172A;
    --clr-primary-hover: #1E293B;
    --clr-focus: rgba(15, 23, 42, 0.15);
    --clr-success: #10B981;
    --clr-danger: #EF4444;
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-floating: 0 30px 60px -12px rgba(0, 0, 0, 0.15), 0 18px 36px -18px rgba(0, 0, 0, 0.1);
    
    /* Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    /* Transitions */
    --transition-fast: 0.15s ease-out;
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.4s var(--ease-smooth);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in { animation: fadeIn 0.8s var(--ease-smooth) forwards; opacity: 0; }
.scale-in { animation: scaleIn 0.8s var(--ease-smooth) forwards; opacity: 0; transform: translateY(20px) scale(0.98); }
.scale-in-delay { animation: scaleIn 0.8s var(--ease-smooth) 0.15s forwards; opacity: 0; transform: translateY(30px) scale(0.97); }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes scaleIn { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes float { 0% { transform: translateY(0); } 50% { transform: translateY(-5px); } 100% { transform: translateY(0); } }

/* ==========================================================================
   Layout & Header
   ========================================================================== */
.page-wrapper {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    position: relative;
    z-index: 2;
}

.ambient-bg {
    position: fixed;
    top: -20vh; left: -10vw; width: 120vw; height: 120vh;
    background: radial-gradient(circle at 50% 0%, rgba(15, 23, 42, 0.03) 0%, transparent 60%);
    z-index: 1; pointer-events: none;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--clr-surface);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--clr-border);
    margin-bottom: 2rem;
}

.badge.floating {
    animation: float 4s ease-in-out infinite;
}

.badge__dot {
    width: 6px; height: 6px;
    background-color: var(--clr-success);
    border-radius: 50%;
}

.logo {
    height: 72px; /* Increased from 48px */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto 1.5rem;
    display: block;
    animation: float 6s ease-in-out infinite; /* Added a subtle float to make it look premium */
}

.title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.title span { display: block; }

.subtitle {
    font-size: 1.05rem;
    color: var(--clr-text-muted);
    max-width: 480px;
    margin: 0 auto;
}

/* ==========================================================================
   Form Card
   ========================================================================== */
.form-card {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-floating);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* Form Grid */
.provider-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}

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

.split-2 > .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    width: 100%;
}

.section-divider {
    height: 1px;
    background: var(--clr-border);
    margin: 1rem 0;
}

.section-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Labels & Inputs */
label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--clr-text-main);
}

.required { color: var(--clr-danger); }

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--clr-text-main);
    background-color: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    outline: none;
    appearance: none;
}

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

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

input:focus, select:focus, textarea:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 4px var(--clr-focus);
}

/* Select Arrow Customization */
select {
    padding-right: 2.5rem;
    cursor: pointer;
}
.select-arrow {
    position: absolute;
    right: 1rem;
    top: 2.5rem; /* Adjusted based on label height + padding */
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--clr-text-muted);
    border-bottom: 2px solid var(--clr-text-muted);
    transform: rotate(45deg);
    pointer-events: none;
}

/* ==========================================================================
   Availability Section
   ========================================================================== */
.availability-group {
    background: #F9FAFB;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.radio-toggle {
    display: flex;
    background: #E5E7EB;
    border-radius: 50px;
    padding: 0.25rem;
}

.radio-toggle input[type="radio"] {
    display: none;
}

.radio-toggle label {
    padding: 0.25rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--clr-text-muted);
}

.radio-toggle input[type="radio"]:checked + label {
    background: var(--clr-surface);
    color: var(--clr-text-main);
    box-shadow: var(--shadow-sm);
}

.time-inputs {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease forwards;
}

.time-inputs.hidden {
    display: none;
}

/* ==========================================================================
   Button
   ========================================================================== */
.form-actions {
    margin-top: 1rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--clr-primary);
    color: var(--clr-surface);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-fast), transform 0.1s;
    box-shadow: var(--shadow-md);
}

.btn-submit:hover {
    background-color: var(--clr-primary-hover);
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-text {
    position: relative;
    z-index: 2;
    transition: opacity 0.2s;
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

/* Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* Loader */
.btn-loader {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    z-index: 2;
}

.btn-submit.loading .btn-loader {
    opacity: 1;
}

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ==========================================================================
   Success State
   ========================================================================== */
.success-state {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--clr-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.5s var(--transition-smooth);
}

.success-state.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.success-icon {
    width: 64px; height: 64px;
    background: var(--clr-success);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

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

.success-state h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--clr-text-main);
}

.success-state p {
    color: var(--clr-text-muted);
}

/* ==========================================================================
   All-Time Availability Checkbox
   ========================================================================== */
.all-time-group {
    border-color: var(--clr-primary);
    background: #f0f4f8;
}

.all-time-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
}

.all-time-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--clr-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.all-time-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--clr-text-main);
    line-height: 1.3;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
/* Tablets and Small Desktops */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 3rem 1.5rem;
    }
    .form-card {
        padding: 2.5rem;
    }
}

/* Mobile Devices */
@media (max-width: 640px) {
    .page-wrapper {
        padding: 2rem 1rem;
    }
    
    .form-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-md);
    }
    
    .form-row.split-2 {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .time-inputs {
        flex-direction: column;
        gap: 1rem;
    }
    
    .select-arrow {
        top: 2.4rem;
    }
    
    .logo {
        height: 56px;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .success-state {
        padding: 2rem 1rem;
    }
    
    .success-icon {
        width: 56px;
        height: 56px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .page-wrapper {
        padding: 1.5rem 0.75rem;
    }
    
    .form-card {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-sm);
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .all-time-text {
        font-size: 0.85rem;
    }
    
    .availability-group {
        padding: 1rem;
    }
}
