/* ============================================
   MODAL & OVERLAY COMPONENTS
   ============================================ */

/* Settings Menu - Premium Dropdown Design */
.settings-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    padding: var(--px-80) var(--px-16) var(--px-16) var(--px-16);
    display: flex;
    justify-content: flex-end;
    transition: opacity var(--transition-smooth);
}

.settings-menu-container {
    background: white;
    border-radius: var(--px-8);
    box-shadow: var(--shadow-large);
    padding: var(--px-4) 0;
    width: var(--px-200);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: slideInRight 0.3s var(--transition-elegant);
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.settings-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--px-8);
    padding: var(--px-8) var(--px-16);
    background: transparent;
    border: none;
    text-align: left;
    font: normal normal 400 var(--s-14);
    color: #374151;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

    .settings-menu-item:hover {
        background: #f9fafb;
    }

.settings-menu-icon {
    width: var(--px-16);
    height: var(--px-16);
    color: #6b7280;
    flex-shrink: 0;
}

.settings-menu-item span {
    flex: 1;
}

.settings-menu-divider {
    height: var(--px-1);
    background: #e5e7eb;
    margin: var(--px-4) 0;
}

.settings-menu-item-logout {
    color: #dc2626;
}

    .settings-menu-item-logout:hover {
        background: #fef2f2;
    }

    .settings-menu-item-logout .settings-menu-icon {
        color: #dc2626;
    }

/* Language select buttons */
.lang-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--px-12);
    padding: var(--px-12) var(--px-16);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--px-8);
    font: normal normal 500 var(--s-14);
    color: #1f2937;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

    .lang-select-btn:hover {
        background: #f9fafb;
        border-color: var(--hotel-primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-soft);
    }

/* Edit Profile Modal - Premium Design */
.edit-profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--px-16);
    transition: opacity var(--transition-smooth);
    overflow: hidden;
}

.edit-profile-container {
    width: 100%;
    max-width: calc(var(--px-500) + var(--px-100));
    background: white;
    border-radius: var(--px-8);
    box-shadow: var(--shadow-xl);
    max-height: calc(100dvh - var(--px-32));
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.4s var(--transition-elegant);
    overflow: hidden;
}

@keyframes slideUpModal {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.edit-profile-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: var(--px-16) var(--px-20);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--px-8) var(--px-8) 0 0;
    flex: 1;
    max-height: var(--px-80);
}

.btn-back-profile {
    display: flex;
    align-items: center;
    gap: var(--px-4);
    background: transparent;
    border: none;
    color: var(--color-green);
    font: normal normal 500 var(--s-14);
    cursor: pointer;
    transition: all var(--transition-smooth);
    padding: var(--px-4) var(--px-8);
    border-radius: var(--px-8);
    display: none;
}

    .btn-back-profile:hover {
        background: rgba(16, 185, 129, 0.1);
    }

.back-icon {
    width: var(--px-20);
    height: var(--px-20);
}

.profile-title {
    flex: 1;
    text-align: center;
    font: normal normal 600 var(--s-18);
    color: #1f2937;
}

.header-spacer {
    width: var(--px-64);
    display: none;
}

/* Content */
.edit-profile-content {
    overflow: hidden;
    flex: 1;
    display: flex;
    width: 100%;
    flex-direction: column;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: var(--px-24);
    padding: var(--px-20);
    overflow: hidden;
}

/* Avatar Section */
.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--px-8);
    flex: 1;
    max-height: var(--px-120);
}

.avatar-wrapper {
    position: relative;
}

.avatar-container {
    width: var(--px-96);
    height: var(--px-96);
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    border: 4px solid white;
    box-shadow: var(--shadow-medium);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: var(--px-32);
    height: var(--px-32);
    border-radius: 50%;
    background: var(--color-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-smooth);
    border: 2px solid white;
}

    .avatar-upload-btn:hover {
        background: #15803d;
        transform: scale(1.1);
    }

.upload-icon {
    width: var(--px-20);
    height: var(--px-20);
    stroke: white;
    left: 3px;
    position: relative;
}

.avatar-hint {
    font: normal normal 400 var(--s-12);
    color: #6b7280;
    text-align: center;
}

/* Upload Section */
.upload-section {
    margin-top: var(--px-12);
}

.upload-label {
    font: normal normal 500 var(--s-11);
    color: #6b7280;
    margin-bottom: var(--px-6);
    display: block;
}

.upload-area {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--px-120);
    padding: var(--px-16);
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: var(--px-8);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

    .upload-area:hover {
        border-color: #9ca3af;
        background: #f3f4f6;
    }

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--px-8);
}

.upload-svg-icon {
    width: var(--px-24);
    height: var(--px-24);
    color: #9ca3af;
}

.upload-text {
    font: normal normal 500 var(--s-13);
    color: #4b5563;
}

.upload-hint {
    font: normal normal 400 var(--s-11);
    color: #6b7280;
}

/* Upload Preview */
.upload-preview {
    position: relative;
    width: 100%;
    height: var(--px-120);
    margin-top: var(--px-8);
    border-radius: var(--px-8);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview-btn {
    position: absolute;
    top: var(--px-8);
    right: var(--px-8);
    width: var(--px-32);
    height: var(--px-32);
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

    .remove-preview-btn:hover {
        background: #dc2626;
        transform: scale(1.1);
    }

.remove-icon {
    width: var(--px-16);
    height: var(--px-16);
    color: white;
}

/* Action Buttons */
.profile-actions {
    display: flex;
    gap: var(--px-12);
    margin-top: var(--px-8);
}

.btn-cancel-profile,
.btn-save-profile {
    flex: 1;
    padding: var(--px-12) var(--px-16);
    border-radius: var(--px-8);
    font: normal normal 600 var(--s-14);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.btn-cancel-profile {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

    .btn-cancel-profile:hover {
        background: #f9fafb;
    }

.btn-save-profile {
    background: var(--color-green);
    border: none;
    color: white;
    box-shadow: var(--shadow-soft);
}

    .btn-save-profile:hover {
        background: #15803d;
        transform: translateY(-1px);
        box-shadow: var(--shadow-medium);
    }

    .btn-save-profile:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Email Input Modal */
.email-input-modal-overlay,
.otp-verification-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .email-input-modal-overlay.show,
    .otp-verification-modal-overlay.show {
        opacity: 1;
    }

.email-input-modal-container,
.otp-verification-modal-container {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease;
    position: relative;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.email-input-header,
.otp-verification-header {
    text-align: center;
    margin-bottom: 24px;
}

.email-input-title,
.otp-verification-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.email-input-subtitle,
.otp-verification-subtitle {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.email-input-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-cancel-email,
.btn-cancel-otp {
    flex: 1;
    padding: 12px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-cancel-email:hover,
    .btn-cancel-otp:hover {
        border-color: #d1d5db;
        background: #f9fafb;
    }

.btn-submit-email,
.btn-verify-otp {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: var(--bg-btn);
    color: var(--txt-btn);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-submit-email:hover,
    .btn-verify-otp:hover {
        background: var(--hotel-primary-dark);
    }

    .btn-submit-email:disabled,
    .btn-verify-otp:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* OTP Verification Specific Styles */
.otp-verification-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* OTP Expiry Warning */
.otp-expiry-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
    font-weight: 500;
}

    .otp-expiry-warning .warning-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

.countdown-timer {
    font-weight: 700;
    color: #d97706;
    transition: color 0.3s ease;
}

/* OTP Input Fields */
.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #1f2937;
    transition: all 0.2s ease;
}

    .otp-input:focus {
        outline: none;
        border-color: var(--bg-btn);
        box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
    }

    .otp-input:focus {
        border-color: var(--bg-btn);
        background: #f0fdf4;
    }

.otp-actions {
    display: flex;
    gap: 12px;
}

.btn-resend-otp {
    flex: 1;
    padding: 12px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-resend-otp:hover {
        border-color: #d1d5db;
        background: #f9fafb;
    }

.btn-cancel-otp {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    top: 12px;
    right: 12px;
}

    .btn-cancel-otp svg {
        width: 20px;
        height: 20px;
    }

    .btn-cancel-otp:hover {
        border-color: #d1d5db;
        background: #f9fafb;
        transform: scale(1.05);
    }

/* Hotel Selection Modal */
.hotel-selection-overlay {
    position: fixed;
    inset: 0;
    background-color: rgb(0 0 0 / 30%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    backdrop-filter: blur(4px);
}

    .hotel-selection-overlay.show {
        opacity: 1;
    }

.hotel-selection-container {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.hotel-selection-overlay.show .hotel-selection-container {
    transform: scale(1);
}

.hotel-selection-header {
    text-align: center;
    margin-bottom: 24px;
}

    .hotel-selection-header .modal-title {
        font-size: 24px;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 8px;
    }

    .hotel-selection-header .modal-subtitle {
        font-size: 14px;
        color: #6b7280;
        line-height: 1.5;
    }

.hotels-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

/* Outlet Selection Modal - Simplified Design */
.outlet-selection-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 20px;
    backdrop-filter: blur(4px);
}

    .outlet-selection-overlay.show {
        opacity: 1;
    }

.outlet-selection-container {
    background: #ffffff;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.outlet-selection-overlay.show .outlet-selection-container {
    transform: scale(1);
}

/* Simple Header */
.outlet-selection-header {
    position: relative;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.outlet-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.025em;
}

.outlet-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .outlet-close-btn svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
        color: #6b7280;
    }

    .outlet-close-btn:hover {
        background: #e5e7eb;
    }

/* Grid Layout */
.outlets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 28px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Outlet Item Card */
.outlet-item {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .outlet-item:hover {
        border-color: #055059;
        box-shadow: 0 8px 24px rgba(5, 80, 89, 0.12);
        transform: translateY(-4px);
    }

    .outlet-item:active {
        transform: translateY(-2px);
    }

/* Image Container */
.outlet-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f9fafb;
    overflow: hidden;
}

.outlet-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.outlet-item:hover .outlet-img {
    transform: scale(1.08);
}

/* Image Placeholder */
.outlet-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

    .outlet-img-placeholder svg {
        width: 64px;
        height: 64px;
        color: #9ca3af;
        stroke-width: 1.5;
    }

/* Outlet Type Badge */
.outlet-type {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #055059;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Content */
.outlet-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.outlet-title {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.outlet-hours {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #6b7280;
    margin: 0;
}

    .outlet-hours svg {
        width: 16px;
        height: 16px;
        stroke-width: 2;
        color: #9ca3af;
        flex-shrink: 0;
    }

/* Responsive Design for Outlet Modal */
@media (max-width: 768px) {
    .outlets-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
        padding: 20px;
    }

    .outlet-image-container {
        height: 160px;
    }

    .outlet-modal-title {
        font-size: 20px;
    }

    .outlet-title {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .outlet-selection-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .outlet-selection-container {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
    }

    .outlet-selection-header {
        padding: 20px 24px;
    }

    .outlet-modal-title {
        font-size: 18px;
        padding-right: 40px;
    }

    .outlet-close-btn {
        width: 32px;
        height: 32px;
    }

        .outlet-close-btn svg {
            width: 18px;
            height: 18px;
        }

    .outlets-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .outlet-image-container {
        height: 140px;
    }

    .outlet-content {
        padding: 14px;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
}

/* Scrollbar Styling for Outlet Grid */
.outlets-grid::-webkit-scrollbar {
    width: 8px;
}

.outlets-grid::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.outlets-grid::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

    .outlets-grid::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }

/* Mobile responsive for outlet modal */
@media (max-width: 640px) {
    .outlet-selection-container {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }

    .outlet-selection-header {
        padding: 24px 20px 20px;
    }

        .outlet-selection-header .modal-title {
            font-size: 22px;
        }

        .outlet-selection-header .modal-subtitle {
            font-size: 14px;
        }

    .outlets-list {
        gap: 10px;
    }

    .outlet-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
        position: relative;
    }

    .outlet-image-wrapper {
        /* width: 100%; */
        /* height: 160px; */
    }

    .outlet-info {
        width: 100%;
    }

    .outlet-arrow {
    }

    .outlet-card:hover .outlet-arrow {
        transform: translateY(-50%) translateX(4px);
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
}

/* Responsive adjustments for modals */
@media (max-width: 640px) {
    .settings-menu-overlay {
        padding: var(--px-64) var(--px-12) var(--px-12) var(--px-12);
    }

    .settings-menu-container {
        width: var(--px-180);
    }

    .settings-menu-item {
        font: normal normal 400 var(--s-13);
        padding: var(--px-10) var(--px-12);
    }
}

@media (max-width: 480px) {
    .settings-menu-container {
        width: var(--px-160);
    }

    .settings-menu-item {
        font: normal normal 400 var(--s-12);
        padding: var(--px-8) var(--px-10);
        gap: var(--px-6);
    }

    .settings-menu-icon {
        width: var(--px-14);
        height: var(--px-14);
    }

    .outlet-selection-header .modal-title {
        font-size: 20px;
    }

    .outlet-name {
        /* font-size: 16px; */
    }

    .outlet-description {
        font-size: 12px;
    }

    .btn-cancel-selection {
        font-size: 14px;
        padding: 12px 20px;
    }
}
