
body {
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: direction 0.3s ease;
}

    /* Arabic font support */
    body[dir="rtl"] {
        font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    }

    /* Background */
    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #8B5A3C 0%, #6B4423 100%);
        background-image: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('/assets/listing-survey/images/grid.png') center/cover no-repeat;
        filter: blur(1px);
        z-index: -1;
    }

.main-container {
    position: relative;
    z-index: 1;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 1300px;
    width: 100%;
    height: calc(100vh - 40px);
}

.card-body {
    padding: 2.5rem;
}


.logo-listing {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 10px;
}

/*loader css*/

#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* semi-transparent black */
    z-index: 1050; /* above most elements */
    display: none; /* hidden by default */
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.logo-loader {
    position: relative;
    width: 200px;
    height: 200px;
}

#logo-svg {
    animation: spin 2s infinite linear;
    transform-origin: center;
}

.logo-content {
    transform-origin: center;
}

#logo-svg path {
    stroke-dasharray: 300;
    stroke-dashoffset: 0;
}

.loading-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    margin: 0 5px;
    background-color: #c5944b;
    border-radius: 50%;
    opacity: 0;
    animation: dot-fade 1.5s infinite;
}

    .dot:nth-child(2) {
        animation-delay: 0.5s;
    }

    .dot:nth-child(3) {
        animation-delay: 1s;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes dot-fade {

    0%, 100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}


/* Form Inputs */
.was-validated .form-control:valid {
    border-color: #ced4da !important;
    /* neutral gray instead of green */
    background-image: none !important;
    /* remove checkmark */
    padding-right: 0.9rem !important;
    box-shadow: unset !important;
}

.was-validated .form-check-input:valid ~ .form-check-label {
    color: black !important;
}


.form-check-input.is-valid ~ .form-check-label,
.was-validated .form-check-input:valid ~ .form-check-label {
    color: black !important;
}

.form-control.is-valid {
    border-color: #ced4da !important;
    /* neutral gray instead of green */
    background-image: none !important;
    /* remove checkmark */
    padding-right: 0.9rem !important;
}

.was-validated .iti .invalid-clone {
    border-color: var(--bs-form-invalid-border-color) !important;
    padding-right: calc(1.5em + .75rem) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(.375em + .1875rem) center !important;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem) !important;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body[dir="rtl"] .language-switcher {
    right: auto;
    left: 20px;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .lang-btn.active {
        background: #c5944b;
        color: white;
        box-shadow: 0 2px 8px rgba(197, 148, 75, 0.3);
    }

    .lang-btn:hover:not(.active) {
        background: rgba(197, 148, 75, 0.1);
        color: #c5944b;
    }

/* Brand */
.brand {
    /* display: flex;
            align-items: center; */
    margin-bottom: 1rem;
}

body[dir="rtl"] .brand {
    flex-direction: row-reverse;
}

.brand-icon {
    width: 45px;
    height: 45px;
    margin-right: 12px;
}

body[dir="rtl"] .brand-icon {
    margin-right: 0;
    margin-left: 12px;
}

.brand-text {
    color: #c5944b;
    font-weight: 600;
    font-size: 16px;
}

.main-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c2c2c;
    /*margin-bottom: 1rem;*/
    line-height: 1.2;
}

.subtitle {
    color: #666;
    font-size: 0.95rem;
    /*margin-bottom: 2.5rem;*/
    line-height: 1.5;
}

/* Main Content Layout */
.content-wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.scroll-container {
    height: calc((100vh - 40px) - (210px + 106px));
    overflow-y: auto;
    overflow-x: hidden;
}

body[dir="rtl"] .content-wrapper {
    flex-direction: row-reverse;
}

/* Stepper Styles */
.stepper-container {
    flex-shrink: 0;
    width: 280px;
}

.stepper {
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 2rem;
}

    .stepper::before {
        content: '';
        position: absolute;
        top: 20px;
        bottom: 20px;
        left: var(--before-left, 20px);
        right: var(--before-right, 0px);
        width: 2px;
        background: #e9ecef;
        z-index: 1;
    }

body[dir="rtl"] .stepper::before {
    left: auto;
    right: 20px;
}

.stepper-progress {
    position: absolute;
    top: 20px;
    left: var(--before-left, 20px);
    right: var(--before-right, 0px);
    width: 2px;
    background: #444f57;
    z-index: 2;
    transition: height 0.3s ease;
}

body[dir="rtl"] .stepper-progress {
    left: auto;
    right: 20px;
}

.stepper-item {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 3;
    gap: 1rem;
}

body[dir="rtl"] .stepper-item {
    flex-direction: row-reverse;
    text-align: right;
}

.stepper-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .stepper-circle.active {
        background: #435058;
        color: white;
    }

    .stepper-circle.completed {
        background: #28a745;
        color: white;
    }

.stepper-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    line-height: 1.3;
}

    .stepper-label.active {
        color: #444f57;
        font-weight: 600;
    }

.stepper-description {
    font-size: 0.75rem;
    color: #999;
    margin-top: 2px;
}

/* Content Area */
.content-area {
    flex: 1;
    min-width: 0;
}

/* Content Styles */
.step-content {
    display: none;
}

    .step-content.active {
        display: block;
    }

.question-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 1.5rem;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 5px;
}

.option-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

    .option-item:hover {
        border-color: #444f57;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(68, 49, 87, 0.15);
    }

    .option-item.selected {
        border-color: #444f57;
        background: rgba(68, 49, 87, 0.05);
    }

.option-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 auto 12px;
}

    .option-icon.green {
        background: #4CAF50;
    }

    .option-icon.orange {
        background: #FF8C42;
    }

    .option-icon.yellow {
        background: #FFC107;
    }

    .option-icon.gray {
        background: #6c757d;
    }

    .option-icon.red {
        background: #dc3545;
    }

    .option-icon.black {
        background: #2c2c2c;
    }

.option-title {
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.option-subtitle {
    font-size: 0.75rem;
    color: #6c757d;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 0.9rem;
}

    .form-control:focus {
        border-color: #444f57;
        box-shadow: 0 0 0 0.2rem rgba(68, 49, 87, 0.25);
    }

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

body[dir="rtl"] .navigation-buttons {
    margin-left: 0;
    margin-right: 320px;
    flex-direction: row-reverse;
}

.btn {
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    transition: all 0.2s ease;
}

.btn-back {
    background: transparent;
    color: #6c757d;
    border: 2px solid #e9ecef !important;
    margin-left: 320px;
}

    .btn-back:hover {
        background: #f8f9fa;
        color: #495057;
    }

.btn-next {
    background: #435058;
    color: white;
    min-width: 100px;
}

    .btn-next:hover {
        background: #435058;
        color: white !important;
        transform: translateY(-1px);
    }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Completion Page Styles */
.completion-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.completion-header {
    margin-bottom: 2.5rem;
}

.completion-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.completion-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 1rem;
}

.completion-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.6;
}

.score-card {
    background: linear-gradient(135deg, #444f57 0%, #444f57 100%);
    border-radius: 20px;
    padding: 1.5rem;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(68, 49, 87, 0.3);
}

.score-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.score-label {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

.score-description h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.score-description p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.points-breakdown {
    text-align: left;
    margin-bottom: 2.5rem;
}

body[dir="rtl"] .points-breakdown {
    text-align: right;
}

.points-breakdown h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 1.5rem;
    text-align: center;
}

.points-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.point-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: white;
    border: 2px solid #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s ease;
}

body[dir="rtl"] .point-item {
    flex-direction: row-reverse;
}

.point-item:hover {
    border-color: #444f57;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.point-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

    .point-icon.sleep {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .point-icon.physical {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    }

.point-content {
    flex: 1;
}

.point-title {
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 0.2rem;
}

.point-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444f57;
}

.toggle-button {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }

    .language-switcher {
        display: none;
    }

    .toggle-button {
        display: block;
    }

    .card-body {
        padding: 1.5rem;
    }

    .main-title {
        font-size: 1.5rem;
    }

    .scroll-container {
        height: calc((100vh - 60px) - (70px + 215px));
    }

    .content-wrapper {
        flex-direction: column;
        gap: 2rem;
        /* height: calc((100vh - 40px) - (210px + 215px)); */
    }



    body[dir="rtl"] .content-wrapper {
        flex-direction: column;
    }

    .stepper-container {
        width: 100%;
    }

    .stepper {
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
    }

        .stepper::before {
            top: 20px;
            bottom: auto;
            left: 0;
            right: 0;
            width: auto;
            height: 2px;
        }

    body[dir="rtl"] .stepper::before {
        left: 0;
        right: 0;
    }

    .stepper-progress {
        top: 20px;
        left: 0;
        width: 0%;
        height: 2px;
    }

    body[dir="rtl"] .stepper-progress {
        left: 0;
        right: auto;
    }

    .stepper-item {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        flex: 1;
    }

    body[dir="rtl"] .stepper-item {
        flex-direction: column;
        text-align: center;
    }

    .stepper-label {
        text-align: center;
        font-size: 0.7rem;
    }

    .stepper-description {
        display: none;
    }

    .stepper-circle {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }

    .option-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    .option-item {
        padding: 16px 12px;
    }

    .navigation-buttons {
        flex-direction: column;
        gap: 6px;
        margin-top: 1rem !important;
        margin-left: unset;
        margin-right: unset;
    }

    body[dir="rtl"] .navigation-buttons {
        margin-right: unset;
    }

    .btn {
        width: 100%;
        margin-left: unset;
    }

    .step-content {
        max-height: 260px;
    }

    .language-switcher {
        position: static;
        margin-bottom: 1rem;
        justify-self: end;
    }
}

@media (max-width: 480px) {
    .option-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.toggle-wrapper {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 20px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e9ecef;
    border-radius: 20px;
    transition: all 0.3s ease;
}

    .toggle-slider:before {
        position: absolute;
        content: "";
        height: 25px;
        width: 25px;
        left: -6px;
        top: -2px;
        background: white;
        border-radius: 50%;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
    }

.toggle-input:checked + .toggle-slider {
    background: #f9f4ed;
    ;
}

    .toggle-input:checked + .toggle-slider:before {
        transform: translateX(28px);
    }

.slider-text {
    position: absolute;
    top: 50%;
    left: 0px;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    z-index: 10;
    pointer-events: none;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 11px
}

.toggle-input:checked + .toggle-slider .slider-text {
    left: 28px;
}

.current-language {
    color: #495057;
    font-size: 16px;
    margin-top: 20px;
    font-weight: 500;
}





/* Toggle theme */
.toggle-theme .toggle-slider {
    background: #f9f4ed;
}

    .toggle-theme .toggle-slider:hover {
        background: #d7b99061;
    }

    .toggle-theme .toggle-slider:before {
        background: #c6974b;
    }

.toggle-theme .slider-text {
    color: white;
    font-weight: 700;
}



.question-description {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #6a7379 !important;
}

.invalid-feedback.show {
    display: block;
}

.modal-header .btn-close {
    margin: unset;
}

.market-description-wrapper {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

    .market-description-wrapper .point {
        color: #666;
        font-size: 0.95rem;
        margin: 5px 0px;
        line-height: 1.5;
    }


.iti {
    display: block !important;
}
