/* style.css - Company Registration Onboarding Flow */

:root {
    --primary-color: #4f46e5; /* Indigo Blue */
    --primary-hover: #4338ca;
    --accent-color: #8b5cf6; /* Purple */
    --text-main: #111827;
    --text-muted: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --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 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-image: url('nyc_daytime_background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Progress Bar Container */
.progress-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 2rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-header {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    position: relative;
    padding-bottom: 60px;
}

.progress-header::before {
    content: '';
    position: absolute;
    bottom: 24px;
    left: 5%;
    right: 5%;
    height: 0;
    border-bottom: 2px dashed #d1c8c0;
    z-index: 0;
}

.progress-fill {
    position: absolute;
    bottom: 24px;
    left: 5%;
    height: 2px;
    background: #22c55e;
    z-index: 1;
    transition: width 0.5s ease;
    width: 0%;
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 125px;
    height: 125px;
    background: rgba(255, 255, 255, 0.7); /* Glassy background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.step-item:not(.active)::after {
    content: '+';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-item::before {
    content: attr(data-step);
    position: absolute;
    bottom: -48px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: #ede8e3;
    border: 2px solid #d1c8c0;
    border-radius: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #78716c;
    font-size: 11px;
    font-weight: 700;
}

.step-item.completed::before {
    content: '✓';
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.step-item.active::before {
    background: #ffffff;
    border-color: #22c55e;
    color: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

.step-circle {
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: #8b857f;
    box-shadow: none;
}

.step-circle svg {
    width: 36px;
    height: 36px;
    stroke-width: 1.5;
}

@keyframes gelPulse {
    0% { transform: translateY(-4px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(-4px); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.spin {
    animation: spin 1s linear infinite;
}

.premium-loader {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-loader .ring {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 4px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.premium-loader .ring-inner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-color);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

.premium-loader .dot {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 1s infinite ease-in-out;
}

.step-item.active {
    background: linear-gradient(135deg, #6fd375, #4bb153);
    border: none;
    border-radius: 20px;
    box-shadow: 
        0px 15px 35px rgba(75, 177, 83, 0.6),
        15px 15px 30px rgba(0, 0, 0, 0.08),
        inset 1.5px 2px 3px rgba(255, 255, 255, 0.4),
        inset -2px -2px 5px rgba(0, 0, 0, 0.08);
    animation: gelPulse 3s infinite ease-in-out;
    transform: translateY(-4px);
    z-index: 5;
    padding-top: 8px;
}

.step-item.completed {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.step-item.active .step-circle {
    border-color: transparent;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}

.step-item.active .step-circle svg {
    width: 48px;
    height: 48px;
    stroke-width: 2.2;
}

.step-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f1d1a;
    text-align: center;
    transition: var(--transition);
    z-index: 10;
}

.step-item.active .step-label {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.percentage-bar {
    display: none;
}

/* Main Form Area */
.form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.form-card {
    background: rgba(255, 255, 255, 0.65); /* Increased transparency for better glass effect */
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    width: 100%;
    max-width: 650px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.step-content {
    display: none;
    animation: fadeInSlide 0.5s ease-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
.step-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.step-subtitle {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.error-msg {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* Custom Select Grid */
.select-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.select-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.select-item:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.02);
}

.select-item.selected {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.select-item i {
    color: #3b82f6;
    width: 28px;
    height: 28px;
}

.select-item span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1f2937;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.form-actions button:first-child,
.form-actions .btn-save {
    margin-right: auto;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.5);
    filter: brightness(1.1);
}

.btn-outline {
    background: white;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-light);
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* Success Step */
.success-card {
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

/* Layout Container */
.registration-layout-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Responsive */
@media (max-width: 992px) {
    .registration-layout-container {
        flex-direction: row;
        align-items: stretch;
        min-height: calc(100vh - 100px);
    }

    .progress-container {
        width: 75px; /* Reduced width for mobile */
        height: 100vh;
        position: sticky;
        top: 0;
        left: 0;
        padding: 2rem 0;
        background: rgba(255, 255, 255, 0.15); /* More visible glass in sidebar */
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        border-right: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 1100; /* Ensure it stays above the navbar on scroll if needed */
        overflow-y: auto;
        overflow-x: hidden;
    }

    .progress-header {
        flex-direction: column;
        gap: 20px;
        padding-bottom: 0;
        width: 100%;
    }

    .progress-header::before, .progress-fill {
        display: none; /* Hide horizontal lines */
    }

    .step-item {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        padding: 0;
        box-shadow: 4px 4px 10px rgba(0,0,0,0.05), -4px -4px 10px rgba(255,255,255,0.5);
    }

    .step-item::before {
        display: none; /* Hide step numbers */
    }

    .step-item .step-label {
        display: none; /* Hide labels */
    }

    .step-item .step-circle svg {
        width: 24px;
        height: 24px;
        stroke-width: 2;
    }

    .step-item.active {
        background: #22c55e;
        box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
        transform: scale(1.1);
        animation: none; /* Remove horizontal animation */
        padding-top: 0;
    }

    .step-item.completed {
        background: #dcfce7;
        color: #15803d;
    }

    .step-item.completed .step-circle {
        color: #15803d;
    }

    .form-wrapper {
        padding: 1rem 0.5rem;
        width: calc(100% - 75px); /* Synchronized with sidebar width */
        overflow-x: hidden;
    }

    .form-card {
        padding: 2rem 1.5rem;
        border-radius: 24px;
        min-height: auto;
    }

    .step-subtitle {
        margin-bottom: 1.5rem;
    }

    .form-actions {
        padding: 1.5rem 0 0;
        margin-top: 2rem;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    /* Force specific order: Next (top), Save (middle), Previous (bottom) */
    .form-actions .btn-primary,
    .form-actions .btn-next { 
        order: 1 !important; 
        width: 100%;
    }
    
    .form-actions .btn-save,
    .form-actions button:nth-child(1) { 
        order: 2 !important; 
        width: 100%;
    }

    .form-actions .btn-prev,
    .form-actions button:nth-child(2),
    .form-actions #availability-back-btn { 
        order: 3 !important; 
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.5rem;
    }

    .owner-row .btn {
        width: auto !important;
        padding: 0.75rem !important; /* Keep square-ish aspect */
    }

    .select-grid {
        grid-template-columns: 1fr;
    }

    .percentage-bar {
        display: none;
    }
}


@media (max-width: 640px) {
    .progress-container {
        width: 60px;
    }
    .form-wrapper {
        width: calc(100% - 60px);
        padding: 0.5rem;
    }
    .form-card {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }
    .step-item {
        width: 42px;
        height: 42px;
    }
    .step-item .step-circle svg {
        width: 20px;
        height: 20px;
    }
}

