/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

/* Base black theme overrides */
body,
html,
.bg_cover,
.bg_style_2,
#wizard_container,
.container-fluid {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
    font-family: "Inter Tight", sans-serif !important;
}

button,
input,
optgroup,
select,
textarea {
    font-family: "Inter Tight", sans-serif !important;
}

header {
    background-color: #000000 !important;
    border: none !important;
    padding: 10px 0 !important;
}

.offcanvas {
    display: none !important;
}

/* Progress bar fixed at very top */
#top-wizard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    margin: 0;
}

#progressbar,
.progress {
    height: 4px !important;
    background-color: transparent !important;
    border-radius: 0 !important;
}

.ui-progressbar-value,
.progress-bar {
    background-color: #d97706 !important;
    height: 100% !important;
}

/* Centered layout */
.d-flex.flex-column.my-auto {
    justify-content: center !important;
}

@media (max-width: 767px) {
    .d-flex.flex-column.my-auto {
        padding-bottom: 80px !important;
        /* perfectly centers vertically above the bottom nav */
    }
}

@media (min-width: 768px) {
    .d-flex.flex-column.my-auto {
        padding-bottom: 0px !important;
        /* no offset needed on desktop */
    }
}

#wizard_container {
    padding: 20px;
    margin: 0 auto;
    box-shadow: none !important;
}

/* Title and Steps */
#middle-wizard {
    counter-reset: step;
}

.step {
    counter-increment: step;
    text-align: center;
}

.question_title {
    margin-bottom: 30px;
    text-align: center;
}

/* Step Number Box */
.question_title {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.question_title h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 5px;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.question_title h3 .step-num {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: #d97706;
    color: #000000;
    font-weight: 800;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
}

.question_title p {
    color: #aaaaaa;
    font-size: 1.1rem;
    margin-bottom: 35px;
}

.highlight {
    color: #ffffff !important;
}

/* Hide step images if they exist to match the text-only minimal app look */
.img_step {
    display: none !important;
}

figure img {
    display: none !important;
}

/* Input Styles */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
textarea {
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px solid #362412 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 1rem !important;
    margin-bottom: 20px;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #b46b15 !important;
    /* Orangish-brown placeholder */
    opacity: 1;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus {
    background-color: transparent !important;
    border-bottom: 1px solid #d97706 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Form Groups */
.group label,
.form-group label {
    display: none !important;
    /* hide original labels since placeholders handle it or they are redundant */
    color: #888888;
}

/* Custom Radio Blocks for Options */
.radio-wrapper {
    display: flex;
    flex-direction: column;
}



.radio_block_container {
    position: relative;
    margin-bottom: 12px;
}

.radio_block_container input[type="radio"],
.radio_block_container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    z-index: -1;
}

.radio_block_container .wrapper {
    display: flex;
    align-items: center;
    background-color: rgba(15, 10, 2, 0.5);
    border: 1px solid #2a1a05;
    border-radius: 8px;
    padding: 12px 15px;
    color: #db8a1a;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.radio_block_container .wrapper:hover {
    border-color: #5c350a;
}

.radio_block_container .wrapper .letter {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #5c350a;
    border-radius: 4px;
    margin-right: 15px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #db8a1a;
    transition: all 0.2s ease;
}

.radio_block_container input[type="radio"]:checked~.wrapper,
.radio_block_container input[type="checkbox"]:checked~.wrapper {
    border-color: #db8a1a !important;
}

.radio_block_container input[type="radio"]:checked~.wrapper .letter,
.radio_block_container input[type="checkbox"]:checked~.wrapper .letter {
    background-color: #db8a1a;
    border-color: #db8a1a;
    color: #000000;
}

/* Error messages */
label.error,
span.error,
.error-message {
    position: static !important;
    background-color: #3f1e14 !important;
    color: #ffcdc2 !important;
    border: 1px solid #5a2717 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: fit-content;
    margin: 10px auto 6px auto !important;
    /* في النص + مسافة تحت */

    line-height: 1 !important;
    height: auto !important;
    text-align: center !important;
}

span.error:after {
    display: none !important;
    /* hide default tooltip arrow */
}

label.error::before,
span.error::before {
    content: "\26A0";
    /* Warning sign */
    margin-right: 6px;
    font-size: 14px;
}

/* Bottom Wizard (Navigation buttons) */
#bottom-wizard {
    padding: 15px 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: #000000;
    border-top: none;
    display: flex !important;
    justify-content: center;
    gap: 15px;
}

.nav-btn {
    background-color: #b46b15 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    height: 50px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.backward.nav-btn {
    width: 55px;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.forward.nav-btn,
.submit.nav-btn {
    flex-grow: 1;
    max-width: 600px;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.nav-btn:hover {
    background-color: #d97706 !important;
}

/* Inline Desktop Next Button */
.inline-btn {
    display: none;
}

/* Desktop Styles */
@media (min-width: 768px) {

    .question_title {
        margin-bottom: 35px;
    }

    .question_title h3 {
        font-size: 1.6rem;
    }

    .d-flex.flex-column.my-auto {
        padding-bottom: 0 !important;
    }

    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    textarea {
        font-size: 1.6rem !important;
        max-width: 770px;
        margin-left: auto;
        margin-right: auto;
        color: #ffa624 !important;
    }

    .inline-btn {
        background-color: #b46b15 !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 6px !important;
        padding: 10px 15px !important;
        font-weight: 700 !important;
        font-size: 0.95rem !important;
        cursor: pointer !important;
        display: inline-block !important;
        /* show on desktop */
        transition: background-color 0.2s;
    }

    .inline-btn:hover {
        background-color: #d97706 !important;
    }

    #bottom-wizard {
        width: auto;
        left: auto;
        right: 30px;
        bottom: 30px;
        background-color: transparent;
        gap: 0px !important;
        padding: 0;
        border-radius: 8px;
    }

    .nav-btn {
        width: 38px !important;
        height: 38px !important;
        flex-grow: 0 !important;
        max-width: 38px !important;
        border-radius: 0 !important;
        font-size: 1.1rem !important;
        padding: 0 !important;
    }

    .backward.nav-btn {
        background-color: #382410 !important;
        /* Dark brown */
        color: #e2cca6 !important;
        /* Pale color for arrow */
        border-radius: 6px 0 0 6px !important;
        width: 38px !important;
    }

    .forward.nav-btn,
    .submit.nav-btn {
        background-color: #b46b15 !important;
        color: #ffffff !important;
        border-radius: 0 6px 6px 0 !important;
    }
}

/* Custom Loader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    bottom: 0;
    background-color: #000;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-bar {
    width: 100px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: #ffffff;
    animation: loader-slide 1.5s infinite ease-in-out;
}

@keyframes loader-slide {
    0% {
        left: -30%;
    }

    100% {
        left: 100%;
    }
}

/* Step Transitions */
.step {
    animation: fadeInUpFast 0.4s ease-out forwards;
}

@keyframes fadeInUpFast {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Start Screen & Success Screen */
.step:first-child::before {
    display: none !important;
    /* Hide step counter on first step (start screen) */
}

.start-screen {
    max-width: 450px;
    margin: 0 auto;
    padding-top: 20px;
}

.start-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.start-subtitle {
    color: #aaaaaa;
    font-size: 1.1rem;
}

.start-btn {
    background-color: #b46b15 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    width: max-content;
    min-width: 200px;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    cursor: pointer !important;
    transition: background-color 0.2s;
    display: inline-block;
}

.start-btn:hover {
    background-color: #d97706 !important;
}

.start-bottom-area {
    margin-top: 40px;
}

.time-info {
    font-size: 0.9rem;
    color: #cccccc;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

@media (max-width: 767px) {
    .start-bottom-area {
        position: fixed;
        bottom: 30px;
        left: 20px;
        right: 20px;
        z-index: 100;
        margin-top: 0;
    }

    .start-btn {
        width: 100% !important;
        max-width: none !important;
        padding: 16px 0 !important;
        font-size: 1.25rem !important;
    }

    .question_title h3 {
        font-size: 18px;
    }

    .question_title h3 .step-num {
        position: absolute;
        top: -33px;
    }

    #middle-wizard {
        margin-left: 0;
        padding: 41px 4px;
    }

    .question_title {
        margin-bottom: 0;
    }



}

/* Modal text overrides */
.modal-content {
    background-color: #1a1a1a;
    color: #ffffff;
}

.modal-header {
    border-bottom: 1px solid #333333;
}

.btn-close {
    filter: invert(1);
}

.top-header {
    padding: 0 !important;
}

.top-header .logo_text {
    font-weight: 600;
}

.top-header .logo_text span {
    font-weight: 500;
}

.top-header .logo_text,
.top-header .logo_text span {
    font-size: 35px !important;
    padding: 0 !important;
}

.start-subtitle {
    margin-bottom: 0 !important;
}

/* Success Screen Styles */
.success-screen-wrapper {
    height: 100vh;
    overflow: hidden;
    background-color: #000;
}

.success-content {
    max-width: 450px;
    margin: 0 auto;
}

.success-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.success-subtitle {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 25px;
}

.success-text {
    color: #aaaaaa;
    font-size: 0.95rem;
    margin-bottom: 40px;
    line-height: 1.5;
}

.success-logo-mobile {
    position: absolute;
    top: 20px;
    width: 100%;
    z-index: 100;
    text-align: center;
}

@media (max-width: 767px) {
    .success-screen-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
        
        /* The requested image background with gradient for readability */
        background-color: #000 !important;
        background-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.8) 70%, rgba(0,0,0,1) 100%), url('../img/kaaba.png') !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    .success-bottom-area {
        position: absolute;
        bottom: 30px;
        left: 20px;
        right: 20px;
        z-index: 100;
    }

    .success-bottom-area .btn {
        width: 100% !important;
        max-width: none !important;
        padding: 16px 0 !important;
        font-size: 1.25rem !important;
    }
    
    .success-content {
        padding-top: 50px;
    }
}