﻿:root {
    --brand: #00aeef;
}

/* Side bar */
.nav-section .nav-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.8rem;
    color: #212529;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.nav-section .nav-item:hover {
    background: #f6f6f6;
    color: var(--brand);
}

.nav-section .nav-item.active {
    background: transparent;
    color: var(--brand);
    font-weight: 700;
}

.nav-section .nav-icon {
    width: 30px;
    height: 30px;
}


.text-main-blue {
    color: var(--brand);
}


.custom-box {
    background-color: #ffffff;
    border-radius: 25px;
    border: 1.5px solid #00aeef;
    padding: 0.75rem 1.25rem;
    color: #212529;
    cursor: default;
}

/* Tab inside pane */
.nav-tabs .nav-link {
    border: 1.5px solid #00aeef;
    color: var(--brand);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    cursor: pointer;
}

.nav-tabs .nav-link.active {
    background-color: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
    font-weight: bold;
}

/* Booking tabs - desktop: original style, mobile: two column */
.booking-tabs-container {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    width: auto;
    margin: 0;
    padding: 10px 0 10px 0;
    list-style: none;
}

.booking-tabs-container .booking-tab-item {
    flex: 0 0 auto;
    max-width: none;
    width: auto;
    margin: 0;
    margin-right: 1rem;
    min-width: 0;
}

.booking-tabs-container .booking-tab-item:last-child {
    margin-right: 0;
}

.booking-tab-link {
    border: 1.5px solid #00aeef;
    color: var(--brand);
    border-radius: 50px;
    padding: 0.5rem 0.5rem;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    cursor: pointer;
    display: block;
    text-align: center;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    box-sizing: border-box;
}

.booking-tab-link.active {
    background-color: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
    font-weight: bold;
}

.booking-tab-link:hover {
    background-color: #f6f6f6;
    color: var(--brand);
    text-decoration: none;
}

.booking-tab-link.active:hover {
    background-color: var(--brand);
    color: #ffffff;
}

.card {
    transition: none;
}

.card:hover {
    transform: none;
}

/* Rotate icon */
.rotate-icon {
    transition: transform .25s ease;
    transform-origin: center;
}

.collapse-toggle:not(.collapsed) .rotate-icon {
    transform: rotate(180deg);
}

.collapse-toggle {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.btn-pill {
    border: 1.5px solid #e91e63;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.btn-pill--outline {
    background: #fff;
    color: #e91e63;
}

.btn-pill--outline:hover {
    background: #fce4ec;
    color: #c2185b;
    border-color: #c2185b;
}

.btn-pill--solid {
    background: #e91e63;
    color: #fff;
}

.btn-pill--solid:hover {
    background: #c2185b;
    color: #fff;
    border-color: #c2185b;
}

#saveProfileInfoBtn:disabled {
    background-color: #727272;
    border: none;
    cursor: not-allowed;
}

.dropdown-item:focus {
    color: inherit;
    background-color: transparent;
    font-weight: bold;
}

/* Input box */
.custom-border {
    border: 1px solid var(--brand);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.custom-border::placeholder {
    font-weight: bold;
    opacity: 0.5;
}

/* Review: rating */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 6px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    color: #c7c7c7;
    user-select: none;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #FCD917;
}

.star-rating.readonly {
    flex-direction: row;
    pointer-events: none;
    cursor: default;
}

/* Password: hide the default eye toggle icon  */
#passwordTab input[type="password"]::-ms-reveal,
#passwordTab input[type="password"]::-ms-clear {
    display: none;
    visibility: hidden;
}

#passwordTab input[type="password"] {
    letter-spacing: 0.1rem;
}

#bookingsTab {
    max-height: 100vh;
    overflow: scroll;
}

#bookingsTab .tab-pane {
    min-height: 22.5rem;
}

#reviewsTab {
    max-height: 100vh;
    overflow: scroll;
}

#reviewsTab .tab-pane {
    min-height: 22.5rem;
}

.review-tab-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #00aeef;
    font-weight: 600;
}

.review-tab-link.active {
    border-bottom-color: #00aeef;
    color: #00aeef;
}

.profile-img {
    display: block;
    transition: 0.3s ease;
}

/* Hide icon initially */
.camera-icon {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

/* Show icon when hover */
.position-relative:hover .camera-icon {
    opacity: 1;
}

/*.position-relative:hover .profile-img {
    filter: brightness(0.4);
}*/

.qr-block img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.qr-block p {
    text-align: center !important;
    width: 100%;
}

/* Mobile Styles */
/* Mobile User Profile */
.mobile-user-profile {
    background-color: #ffffff;
}

.mobile-user-profile .user-info a {
    color: var(--brand);
}

/* Mobile Booking Cards */
.mobile-booking-card {
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    background-color: #ffffff;
}

.mobile-booking-card .card-body {
    padding: 1rem;
}

.mobile-booking-card p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.mobile-booking-card strong {
    font-weight: 600;
}

/* Mobile In-Page Navigation (3 Column Menu) */
.mobile-inpage-nav {
    margin-top: 1rem;
}

.mobile-inpage-nav .row {
    margin: 0;
}

.mobile-inpage-nav .col-4 {
    padding: 0.25rem;
}

.mobile-nav-link {
    display: block;
    text-decoration: none;
    color: var(--brand);
    transition: all 0.2s;
    border-radius: 0.5rem;
    background-color: #f8f8f8;
    height: 100%;
}

.mobile-nav-link:hover {
    background-color: #f0f0f0;
    text-decoration: none;
    color: var(--brand);
    transform: translateY(-2px);
}

.mobile-nav-link.active {
    background-color: #e8e8e8;
    border: 1px solid var(--brand);
}

.mobile-nav-link .mobile-nav-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0.5rem;
}

.mobile-nav-link span {
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Mobile & Tablet Container Adjustments (below lg breakpoint) */
@media (max-width: 991.98px) {
    .container.p-5 {
        padding: 1rem !important;
    }

    .mobile-user-profile {
        margin-bottom: 1rem;
    }

    #bookingsTab {
        max-height: none;
        overflow: visible;
    }

    #bookingsTab .tab-pane {
        min-height: auto;
    }

    .custom-box {
        border-radius: 0.75rem;
        padding: 1rem;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .nav-tabs .nav-link {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .nav-tabs .nav-link:not(.active) {
        background-color: #f5f5f5;
        color: #666;
    }

    /* Mobile/Tablet: two column layout */
    .booking-tabs-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    .booking-tabs-container .booking-tab-item {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        margin: 0 !important;
        padding: 0 0.25rem;
    }

    .booking-tabs-container .booking-tab-item:first-child {
        padding-left: 0;
        padding-right: 0.25rem;
    }

    .booking-tabs-container .booking-tab-item:last-child {
        padding-right: 0;
        padding-left: 0.25rem;
        margin-right: 0;
    }

    .booking-tab-link {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }

    .mobile-booking-card .btn-pill {
        width: 100%;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .mobile-booking-card .collapse-toggle {
        color: var(--brand);
    }

    .mobile-booking-card .collapse-toggle:hover {
        color: var(--brand);
        opacity: 0.8;
    }

    /* Password section mobile-first */
    .password-field-wrapper {
        width: 100%;
    }

    .password-field-wrapper label {
        text-align: left;
    }

    #passwordTab .btn-pill {
        width: 100%;
    }
}

/* Mobile-specific adjustments (phones only) */
@media (max-width: 575.98px) {
    .container.p-5 {
        padding: 0.75rem !important;
    }

    .mobile-nav-link span {
        font-size: 0.7rem;
    }

    .mobile-nav-link .mobile-nav-icon {
        width: 24px;
        height: 24px;
    }
}

/* Tablet view: 768px - 991px - Enhanced mobile layout */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Larger container padding for tablets */
    .container.p-5 {
        padding: 1.5rem !important;
    }

    /* Bigger profile section for tablets */
    .mobile-user-profile {
        padding: 1rem;
    }

    .mobile-user-profile .d-flex.align-items-center {
        padding: 1rem;
    }

    #profileImageMobile {
        width: 5rem !important;
        height: 5rem !important;
    }

    .mobile-user-profile .profile-fullname {
        font-size: 1.25rem !important;
    }

    .mobile-user-profile .user-info a {
        font-size: 1rem !important;
    }

    /* Larger navigation icons and text for tablets */
    .mobile-nav-link .mobile-nav-icon {
        width: 36px;
        height: 36px;
    }

    .mobile-nav-link span {
        font-size: 0.875rem;
    }

    .mobile-inpage-nav .col-4 {
        padding: 0.5rem;
    }

    .mobile-nav-link > div {
        padding: 1.25rem !important;
    }

    /* Better custom box styling */
    .custom-box {
        border-radius: 1rem;
        padding: 1.5rem;
    }

    /* Adjust profile panel padding */
    .profile-panel {
        padding: 1.5rem !important;
    }

    /* Adjust heading sizes */
    .profile-panel h4 {
        font-size: 1.25rem;
    }

    /* Larger form inputs */
    .form-control,
    .form-select {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }

    /* Adjust tab links for tablets */
    .nav-tabs .nav-link {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }

    /* Adjust booking tab links */
    .booking-tab-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Better button sizing */
    .btn-pill {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }

    /* Adjust modal widths */
    .modal-dialog {
        max-width: 85%;
    }

    /* Two-column form layout on tablets */
    .profile-panel .row.g-3 .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .profile-panel .row.g-3 .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .profile-panel .row.g-3 .col-md-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }
}

/* Desktop: Password section (lg and up) */
@media (min-width: 992px) {
    .password-field-wrapper {
        max-width: 700px;
    }

    #passwordTab .d-flex.flex-column.flex-md-row {
        max-width: 700px;
    }

    #passwordTab .btn-pill {
        width: auto;
    }

    /* Desktop sidebar column widths */
    .row.g-4 > .col-lg-3 {
        width: 25%;
        max-width: 25%;
    }

    .row.g-4 > .col-lg-9 {
        width: 75%;
        max-width: 75%;
    }

    #profileImage {
        width: 7rem !important;
        height: 7rem !important;
    }

    .nav-section .nav-item {
        font-size: 18px;
        padding: 0.8rem;
        gap: 1.5rem;
    }

    .nav-section .nav-icon {
        width: 30px;
        height: 30px;
    }

    .custom-box[style*="height: 60vh"] {
        height: 60vh !important;
    }
}

/* Smaller desktop screens: 992px - 1199px */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Slightly narrower sidebar */
    .row.g-4 > .col-lg-3 {
        width: 28%;
        max-width: 28%;
    }

    .row.g-4 > .col-lg-9 {
        width: 72%;
        max-width: 72%;
    }

    /* Reduce profile image size */
    #profileImage {
        width: 5.5rem !important;
        height: 5.5rem !important;
    }

    /* Adjust navigation items */
    .nav-section .nav-item {
        font-size: 15px;
        padding: 0.6rem;
        gap: 1rem;
    }

    .nav-section .nav-icon {
        width: 24px;
        height: 24px;
    }

    /* Adjust user info text */
    .user-info {
        font-size: 0.9rem !important;
    }

    .user-info .profile-fullname {
        font-size: 1rem !important;
    }

    .user-info a {
        font-size: 0.85rem !important;
    }

    /* Adjust sidebar box height */
    .custom-box[style*="height: 60vh"] {
        height: auto !important;
        min-height: 50vh;
    }
}