html,
body {
    height: 100%;
}

body {
    margin: 0;
    background-image: url("/image/media.jpg");
    background-repeat: no-repeat;
    background-size: 110% 100%;

}


/* الصندوق الذي يحتوي كل خطوات الحجز */
#booking-box {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    width: 490px;
    z-index: 10;
}

/* العنوان */
h1 {
    font-size: 48px;
    color: rgb(255, 255, 255);
    margin-bottom: 20px;

}

h3 {
    margin-bottom: 0;
    font-size: 20px;
}

/* الأزرار تحت العنوان وعمودي */
#gender-selection {

    display: flex;
    flex-direction: column;
    gap: 15px;
}

button {
    padding: 25px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 8px;
    font-size: 18px;

}

.service-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    /* Back يسار / Next يمين */
    margin-top: 15px;
}

.step-actions .next-btn:only-child {
    margin-left: auto;
}

.next-btn,
.back-btn {
    padding: 8px 14px;
    /* أصغر من السابق */
    font-size: 14px;
    border-radius: 6px;
    width: auto;
}

#services-men,
#services-women {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 30px;

}

#booking-form {
    margin-top: 16px;
    padding: 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    /* هذا هو المهم */
}

/*#service-selection,*/
#date-selection,
#time-selection,
#booking-form {
    display: none;
}

/* Selected (active) button style */
button.btn-active {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: white !important;
}

/* optional: smooth hover */
button:hover,
.next-btn:hover,
.back-btn:hover {
    opacity: 0.95;
}

#haircut-options h2 {
    white-space: nowrap;
    /* يمنع النزول لسطر ثاني */
    font-size: 20px;
    text-align: center;
}


/*

#haircut-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    margin: auto;
    gap: 15px;
}

#haircut-options .sub-service-btn {
    width: 400px;

}

#haircut-options .step-actions {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}*/


.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.calendar-days div {
    text-align: center;
    font-weight: bold;
}




/* override القديم */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;

}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;

}

.calendar-grid button {
    padding: 10px;
    font-size: 14px;
    border-radius: 6px;

}

.calendar-grid button.btn-active {
    background: #1a73e8;
    color: white;
}

.calendar-grid button:disabled {
    background: #eee;
    color: #999;
}

#date-selection {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

#date-selection .step-actions {
    margin-top: 20px;
}

.calendar-header button {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 6px;
}

/* ===== TIME GRID ===== */

#time-selection {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* شبكة الأوقات */
#time-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 5 بكل سطر */
    gap: 8px;
    max-width: 350px;
    margin: 10px 0;
    margin-left: 10px;
}

/* شكل كل وقت */
.time-slot {
    padding: 12px 10px;
    font-size: 16px;
    text-align: center;
    border-radius: 8px;
    background: #f2f2f2;
    cursor: pointer;
    border: 1px solid #ddd;
}

/* عند الاختيار */
.time-slot.btn-active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.time-slot.disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

#booking-form input {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    /* مسافة بين الحقول */
    padding: 14px;
    font-size: 15px;
}

#book-btn {
    padding: 10px 16px;
    font-size: 14px;
    width: auto;
}


/* ================= MOBILE FIX ================= */
/*@media (max-width: 768px) {

    html,
    body {
        height: 100%;
        min-height: 100%;
        overflow-x: hidden;
    }

    body {
        margin: 0;
        padding: 0;    
        background-image: url("/image/media.jpg");
        background-repeat: no-repeat;
        background-size: auto 100%;
        background-position: left center;
    }

    #booking-box {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 42vw;
        max-width: 190px;
        min-width: 155px;
        z-index: 10;
    }

    h1 {
        font-size: 24px;
        text-align: left;
        margin-bottom: 12px;
        white-space: nowrap;
    }

    h2 {
        font-size: 18px;
        color: white;
    }

    h3 {
        font-size: 13px;
        color: black;
        line-height: 1.3;
    }

    button {
        width: 100%;
        padding: 14px 8px;
        font-size: 14px;
        border-radius: 7px;
    }

    #gender-selection {
        gap: 10px;
    }

    .next-btn,
    .back-btn,
    #book-btn {
        width: auto;
        padding: 8px 10px;
        font-size: 12px;
    }

    .step-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }

    .step-actions .next-btn:only-child {
        margin-left: auto;
    }

    #services-men,
    #services-women {
        max-height: 75vh;
        overflow-y: auto;
        padding-right: 6px;
        gap: 10px;
    }

    .service-btn {
        width: 100%;
        gap: 8px;
        padding: 12px 8px;
        font-size: 12px;
    }

    .service-btn span {
        font-size: 12px;
    }

    .calendar-header h3 {
        margin: 0;
        color: white;
        font-size: 14px;
    }

    .calendar-header button {
        width: auto;
        padding: 5px 8px;
        font-size: 12px;
    }

    .calendar-days {
        color: white;
        font-size: 11px;
    }

    .calendar-grid button {
        padding: 6px 2px;
        font-size: 11px;
    }

    #time-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, 1fr);
        margin: 8px 0;
        gap: 6px;
    }

    .time-slot {
        padding: 8px 4px;
        font-size: 12px;
    }

    #booking-form {
        padding: 0;
    }

    #booking-form input {
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
        font-size: 13px;
    }
}*/

/* ================== موبايل عامودي ================== */
/* موبايل عامودي فقط */
@media (max-width: 768px) and (orientation: portrait) {

    html,
    body {
        height: 100%;
        min-height: 100%;
        margin: 0;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
    }

    body {
        width: 160vw;
        background-image: url("/image/media.jpg");
        background-repeat: no-repeat;
        background-size: auto 100%;
        background-position: left center;
    }

    #booking-box {
        position: absolute;
        left: 105vw;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
        width: 42vw;
        max-width: 190px;
        min-width: 155px;
        z-index: 10;
    }

    h1 {
        font-size: 24px;
        text-align: left;
        margin-bottom: 12px;
        white-space: nowrap;
    }

    h2 {
        font-size: 18px;
        color: white;
    }

    h3 {
        font-size: 13px;
        color: black;
        line-height: 1.3;
    }

    button {
        width: 100%;
        padding: 14px 8px;
        font-size: 14px;
        border-radius: 7px;
    }

    #gender-selection {
        gap: 10px;
    }

    .next-btn,
    .back-btn,
    #book-btn {
        width: auto;
        padding: 8px 10px;
        font-size: 12px;
    }

    .step-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }

    .step-actions .next-btn:only-child {
        margin-left: auto;
    }

    #services-men,
    #services-women {
        max-height: 75vh;
        overflow-y: auto;
        padding-right: 6px;
        gap: 10px;
    }

    .service-btn {
        width: 100%;
        gap: 8px;
        padding: 12px 8px;
        font-size: 12px;
    }

    .service-btn span {
        font-size: 12px;
    }

    .calendar-header h3 {
        margin: 0;
        color: white;
        font-size: 14px;
    }

    .calendar-header button {
        width: auto;
        padding: 5px 8px;
        font-size: 12px;
    }

    .calendar-days {
        color: white;
        font-size: 11px;
    }

    .calendar-grid button {
        padding: 6px 2px;
        font-size: 11px;
    }

    #time-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, 1fr);
        margin: 8px 0;
        gap: 6px;
    }

    .time-slot {
        padding: 8px 4px;
        font-size: 12px;
    }

    #booking-form {
        padding: 0;
    }

    #booking-form input {
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
        font-size: 13px;
    }
}


/* موبايل أفقي فقط */
/*@media (max-width: 768px) and (orientation: landscape) {

    html,
    body {
        height: 100%;
        min-height: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body {
        width: 100%;
        background-image: url("/image/media.jpg");
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }

    #booking-box {
        position: absolute;
        right: 12px;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
        width: 42vw;
        max-width: 260px;
        min-width: 200px;
        z-index: 10;
    }

    button {
        width: 100%;
    }
}*/