/* Onboarding Panel Styling - Using Fixed Pixel Values */

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Primary Container */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: transparent;
    width: 600px !important; /* Fixed width */
    margin: 0 auto;
    padding: 0;
    overflow: auto;
}

/* Main Content Wrapper */
.onboarding-content {
    width: 600px !important; /* Fixed width */
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Container Inside Wrapper */
.container {
    width: 600px !important; /* Fixed width */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

/* Header Styling */
.header {
    width: 600px !important; /* Fixed width */
    padding: 18px 28px 26px;
    background: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 50%;
    margin-left: -300px; /* Half the width for proper centering */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    z-index: 20;
}

/* Progress Container */
.progress-container {
    width: 600px !important; /* Fixed width */
    padding: 10px 15px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: fixed;
    top: 92px;
    left: 50%;
    margin-left: -300px; /* Half the width for proper centering */
    z-index: 10;
}

/* Form Content */
.form-content {
    width: 600px !important; /* Fixed width */
    margin-top: 152px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px 12px;
    padding-top: 25px !important; /* Add padding at the top of form content */
    overflow-y: auto;
}

/* Form Sections - Override any inline styles */
.form-section,
#section-company {
    width: 570px !important; /* Fixed width - slightly less than parent */
    max-width: 570px !important;
    margin: 0 auto !important;
    padding: 20px 0;
    border-bottom: none;
}

/* Debug Outlines - Uncomment to see boundaries */
/*
.header { outline: 2px solid red; }
.progress-container { outline: 2px solid blue; }
.form-content { outline: 2px solid green; }
.form-section { outline: 2px solid purple; }
*/

/* Rest of your styles but with fixed widths */
.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 30;
    border: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(3px);
}

.close-btn:hover {
    background: rgba(229, 62, 62, 0.8);
    color: white;
    transform: rotate(90deg);
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    position: relative;
}

.logo i {
    font-size: 24px;
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    border-radius: 8px;
}

h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

.header p {
    font-size: 13px;
    opacity: 0.95;
    margin: 1px 0 0 0;
    position: relative;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e2e8f0;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.step-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

.progress-step.active .step-indicator {
    background-color: #3182ce;
    color: white;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.progress-step.active .step-label {
    color: #2d3748;
    font-weight: 600;
}

.progress-step.completed .step-indicator {
    background-color: #38a169;
    color: white;
}

.form-section.hidden {
    display: none !important;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    letter-spacing: 0.2px;
    padding-left: 0;
    margin-left: 0;
}

.section-title i {
    margin-right: 5px;
    color: #3182ce;
    font-size: 20px;
}

.optional-label {
    font-size: 14px;
    font-weight: normal;
    color: #718096;
    margin-left: 8px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    width: 100%;
}

.form-group {
    padding: 0;
    margin-bottom: 12px;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.form-group.half {
    width: 48%;
    margin-right: 2%;
}

.form-group.half + .form-group.half {
    margin-right: 0;
    margin-left: 2%;
}

@media (max-width: 768px) {
    .form-group.half {
        width: 100%;
    }
    
    .form-group.half + .form-group.half {
        margin-left: 0;
    }
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 6px;
}

.form-label.required::after {
    content: '*';
    color: #e53e3e;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    background-color: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 15px;
    color: #2d3748;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
    transform: translateY(-1px);
}

.form-control.invalid {
    border-color: #e53e3e;
    background-color: rgba(229, 62, 62, 0.05);
}

.invalid-feedback {
    display: none;
    font-size: 13px;
    color: #e53e3e;
    margin-top: 4px;
}

.form-control.invalid + .invalid-feedback {
    display: block;
}

.section-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.3px;
    background: rgba(49, 130, 206, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.btn i {
    margin-right: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn:hover {
    color: #ffffff;
    background: rgba(43, 108, 176, 0.95);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn:hover i {
    transform: translateY(-1px);
}

.next-btn i, .submit-btn i {
    margin-right: 0;
    margin-left: 8px;
}

.btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.btn:hover::before {
    width: 30px;
}

.btn-primary {
    background: rgba(49, 130, 206, 0.9);
    color: white;
}

.btn-primary:hover {
    background: rgba(43, 108, 176, 0.95);
}

.btn-outline {
    background: rgba(49, 130, 206, 0.9);
    color: white;
    border: none;
}

.btn-outline:hover {
    background: rgba(43, 108, 176, 0.95);
}

.back-btn, .next-btn, .submit-btn {
    margin-top: 0px;
}

.form-footer {
    padding: 0;
    background-color: transparent;
    border-top: none;
}

.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 0;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.save-btn {
    display: none;
}

.submit-btn {
    min-width: 120px;
    background: rgba(49, 130, 206, 0.9);
}

.submit-btn:disabled {
    background: rgba(49, 130, 206, 0.4);
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2d3748;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    z-index: 1100;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.active {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification i {
    margin-right: 10px;
    font-size: 18px;
}

.toast-notification.success {
    background-color: #38a169;
}

.toast-notification.error {
    background-color: #e53e3e;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeIn 0.4s ease forwards;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body, 
    .onboarding-content,
    .container,
    .header,
    .progress-container,
    .form-content {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .header, .progress-container {
        left: 0 !important;
        margin-left: 0 !important;
    }
    
    .form-section,
    #section-company {
        width: 100% !important;
        max-width: 100% !important;
    }
}