﻿: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;*/
    overflow: auto;
}

#bookingsTab .tab-pane {
    min-height: 22.5rem;
}

#reviewsTab {
    max-height: 100vh;
    /*overflow: scroll;*/
    overflow: auto;
}

#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;
}

#VoucherTab {
    max-height: 100vh;
    /*overflow: scroll;*/
    overflow: auto;
}

.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;*/
        height: auto !important;
        min-height: 60vh;
    }
}

/* 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;
    }
}

#voucherTabList .voucher-card-item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: default;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
    border: 1.5px solid #e8e8e8;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

    #voucherTabList .voucher-card-item:hover {
        box-shadow: 0 3px 14px rgba(111, 66, 193, 0.18);
        border-color: #c9a0f5;
    }

    #voucherTabList .voucher-card-item.expired {
        filter: grayscale(100%);
        opacity: 0.52;
        cursor: not-allowed;
        pointer-events: none;
    }

#voucherTabList .voucher-left-side {
    width: 88px;
    min-width: 88px;
    background-color: #6f42c1;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    padding: 1rem 0.4rem;
    gap: 4px;
    pointer-events: none;
}

    #voucherTabList .voucher-left-side .amount {
        font-weight: 800;
        font-size: 1.3rem;
        line-height: 1;
        white-space: nowrap;
    }

    #voucherTabList .voucher-left-side .label {
        font-size: 0.55rem;
        font-weight: 700;
        opacity: 0.9;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        line-height: 1.2;
        word-break: break-word;
        white-space: normal;
    }

#voucherTabList .dotted-divider {
    width: 26px;
    min-width: 26px;
    flex-shrink: 0;
    align-self: stretch;
    position: relative;
    background: linear-gradient(to right, #6f42c1 50%, #ffffff 50%);
}

    #voucherTabList .dotted-divider::after {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle, #ffffff 7.5px, transparent 7.5px);
        background-size: 26px 20px;
        background-repeat: repeat-y;
        background-position: center top;
    }

#voucherTabList .info-container {
    pointer-events: none;
    min-width: 0;
    overflow: hidden;
}

#voucherTabList .tc-link-btn {
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
    background: none;
    border: 1px solid #00aeef;
    color: #00aeef;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

    #voucherTabList .tc-link-btn:hover {
        background: #00aeef;
        color: #fff;
    }

#voucherTabList .btn-pill,
.profile-voucher-use-btn {
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

/* ── DESKTOP action column: T&C + Use Now side by side ── */
.voucher-action-desktop {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem;
}

    .voucher-action-desktop .profile-voucher-use-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
        white-space: nowrap;
    }

    .voucher-desktop-tc {
        display: block;
        pointer-events: auto;
    }

/* ── MOBILE bottom row: hidden on desktop ── */
.voucher-mobile-bottom-row {
    display: none;
}

.profile-voucher-unavailable-badge {
    font-size: 0.68rem;
    font-weight: 600;
    color: #888;
    background: #f0f0f0;
    border: 1px solid #bbb;
    border-radius: 20px;
    padding: 3px 10px;
    white-space: nowrap;
}

/* ── MOBILE only (≤575px) ── */
@media (max-width: 575.98px) {

    /* Hide desktop action column entirely */
    .voucher-action-desktop {
        display: none !important;
    }

    .voucher-desktop-tc {
        display: none !important;
    }

    /* Show mobile bottom row: T&C left, Use Now right */
    .voucher-mobile-bottom-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 6px;
        pointer-events: auto;
    }

        .voucher-mobile-bottom-row .profile-voucher-use-btn {
            font-size: 0.72rem;
            padding: 0.3rem 0.7rem;
            white-space: nowrap;
        }

        .voucher-mobile-bottom-row .tc-link-btn {
            font-size: 0.68rem;
            padding: 2px 6px;
        }

    #voucherTabList .voucher-left-side {
        width: 80px;
        min-width: 80px;
        padding: 0.5rem 0.25rem;
        text-align: center;
    }

        #voucherTabList .voucher-left-side .amount {
            font-size: 1rem;
            white-space: nowrap;
            max-width: 100%;
        }

        #voucherTabList .voucher-left-side .label {
            font-size: 0.55rem;
            letter-spacing: 0.04em;
            line-height: 1.1;
            max-width: 100%;
            word-break: normal;
            white-space: nowrap;
        }

    #voucherTabList .dotted-divider {
        width: 20px;
        min-width: 20px;
    }

        #voucherTabList .dotted-divider::after {
            background-size: 20px 18px;
        }

    #voucherTabList .info-container p.fw-bold {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #voucherTabList .info-container .text-muted.small {
        font-size: 0.72rem;
    }

    #voucherTabList .voucher-category-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 8px;
        margin-top: 4px;
        margin-bottom: 10px;
        border-bottom: 1px dashed #e5e5e5;
    }

    #voucherTabList .voucher-category-label {
        font-size: 0.72rem;
        font-weight: 700;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    #voucherTabList .voucher-category-header[data-status="Available"] {
        border-left: 3px solid #26aa99;
    }

    #voucherTabList .voucher-category-header[data-status="Used"] {
        border-left: 3px solid #6c757d;
    }

    #voucherTabList .voucher-category-header[data-status="Expired"] {
        border-left: 3px solid #adb5bd;
    }

    #voucherTabList .voucher-category-header[data-status="Unavailable"] {
        border-left: 3px solid #ced4da;
    }

    #voucherTabList .voucher-card-item[data-status="Used"] {
        filter: none;
        opacity: 0.75;
    }

        #voucherTabList .voucher-card-item[data-status="Used"] .voucher-left-side {
            background: #6c757d;
        }

        #voucherTabList .voucher-card-item[data-status="Used"] .dotted-divider {
            background: linear-gradient(to right, #6c757d 50%, #ffffff 50%);
        } 

    #voucherTabList .voucher-card-item[data-status="Expired"] {
        filter: none;
        opacity: 0.7;
    }

        #voucherTabList .voucher-card-item[data-status="Expired"] .voucher-left-side {
            background: #adb5bd;
        }

        #voucherTabList .voucher-card-item[data-status="Expired"] .dotted-divider {
            background: linear-gradient(to right, #adb5bd 50%, #ffffff 50%);
        }

    #voucherTabList .voucher-card-item[data-status="Unavailable"] {
        filter: none;
        opacity: 0.65;
    }

        #voucherTabList .voucher-card-item[data-status="Unavailable"] .voucher-left-side {
            background: #ced4da;
        }

        #voucherTabList .voucher-card-item[data-status="Unavailable"] .dotted-divider {
            background: linear-gradient(to right, #ced4da 50%, #ffffff 50%);
        }

    .voucher-card-item[data-status="Used"] .profile-voucher-unavailable-badge {
        color: #fff;
        background: #6c757d;
        border-color: #6c757d;
    }

    .voucher-card-item[data-status="Expired"] .profile-voucher-unavailable-badge {
        color: #495057;
        background: #dee2e6;
        border-color: #dee2e6;
    }

    .voucher-card-item[data-status="Unavailable"] .profile-voucher-unavailable-badge {
        color: #495057;
        background: #e9ecef;
        border-color: #e9ecef;
    }

}