/* Custom Shop Authentication Styles */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

.shop-auth-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 440px;
    background: rgba(0, 8, 54, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 36px 36px;
    z-index: 10001;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(59, 173, 249, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(59, 173, 249, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-auth-modal.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.shop-auth-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-auth-overlay.active {
    display: block;
    opacity: 1;
}

.auth-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.auth-close:hover {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.3);
    transform: rotate(90deg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #3BADF9, #2EF1A8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(59, 173, 249, 0.3);
}

.auth-icon svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: rgba(176, 196, 216, 0.7);
    font-weight: 400;
}

.auth-form-group {
    margin-bottom: 18px;
    position: relative;
}

.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(176, 196, 216, 0.8);
    margin-bottom: 7px;
    letter-spacing: 0.3px;
}

.auth-input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(59, 173, 249, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: rgba(176, 196, 216, 0.35);
}

.auth-input:focus {
    border-color: #3BADF9;
    background: rgba(59, 173, 249, 0.06);
    box-shadow: 0 0 0 3px rgba(59, 173, 249, 0.1),
        0 0 20px rgba(59, 173, 249, 0.08);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3BADF9, #2EF1A8);
    border: none;
    border-radius: 12px;
    color: #000836;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    box-sizing: border-box;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 173, 249, 0.35);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: rgba(176, 196, 216, 0.6);
}

.auth-link {
    color: #3BADF9;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
    text-decoration: none;
}

.auth-link:hover {
    color: #2EF1A8;
}

.auth-error-msg {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: #f87171;
    display: none;
    text-align: center;
}

.auth-error-msg.show {
    display: block;
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* ===== Password toggle ===== */
.auth-password-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.auth-password-wrapper input.password-input {
    padding-right: 45px !important;
}

[dir="rtl"] .auth-password-wrapper input.password-input {
    padding-right: 16px !important;
    padding-left: 45px !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: rgba(176, 196, 216, 0.5);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    width: 28px !important;
    height: 28px !important;
    min-width: unset !important;
    min-height: unset !important;
    box-shadow: none !important;
    border-radius: 50% !important;
}

.password-toggle:hover {
    color: #3BADF9;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* ===== Phone validation error ===== */
.phone-validation-error {
    color: #f87171;
    font-size: 0.78rem;
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 5px;
}

.phone-validation-error.show {
    display: flex;
}

.phone-validation-error svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ===== intl-tel-input dark theme overrides ===== */
.iti {
    width: 100%;
}

.iti__country-container {
    padding: 0;
}

.iti__selected-country {
    background: rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px 0 0 12px;
    padding: 0 12px !important;
    border-right: 1px solid rgba(59, 173, 249, 0.15);
    transition: background 0.3s ease;
}

[dir="rtl"] .iti__selected-country {
    border-radius: 0 12px 12px 0;
    border-right: none;
    border-left: 1px solid rgba(59, 173, 249, 0.15);
}

.iti__selected-country:hover {
    background: rgba(59, 173, 249, 0.1) !important;
}

.iti__selected-dial-code {
    color: rgba(176, 196, 216, 0.8);
    font-size: 0.88rem;
    font-weight: 500;
}

.iti__arrow {
    border-top-color: rgba(176, 196, 216, 0.5);
}

.iti__arrow--up {
    border-bottom-color: rgba(176, 196, 216, 0.5);
}

.iti__dropdown-content {
    background: rgba(0, 8, 54, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 173, 249, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    overflow: hidden;
    z-index: 100 !important;
}

.iti__search-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(59, 173, 249, 0.15) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-family: 'Cairo', sans-serif !important;
    padding: 10px 14px !important;
    margin: 8px !important;
    width: calc(100% - 16px) !important;
    box-sizing: border-box;
    outline: none !important;
}

.iti__search-input::placeholder {
    color: rgba(176, 196, 216, 0.4) !important;
}

.iti__search-input:focus {
    border-color: #3BADF9 !important;
    box-shadow: 0 0 0 2px rgba(59, 173, 249, 0.1) !important;
}

.iti__country-list {
    background: transparent !important;
    max-height: 220px;
}

.iti__country {
    padding: 8px 14px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: background 0.15s ease;
}

.iti__country:hover,
.iti__country--highlight {
    background: rgba(59, 173, 249, 0.12) !important;
}

.iti__country-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}

.iti__dial-code {
    color: rgba(59, 173, 249, 0.7);
    font-size: 0.82rem;
}

.iti .auth-input {
    padding-left: 140px !important;
}

[dir="ltr"] .auth-input.iti__tel-input {
    padding-left: 115px !important;
    padding-right: 16px !important;
}

[dir="rtl"] .auth-input.iti__tel-input {
    padding-left: 115px !important;
    padding-right: 16px !important;
}

[dir="rtl"] .auth-close {
    right: auto;
    left: 20px;
}

[dir="rtl"] .password-toggle {
    right: auto;
    left: 14px;
}

.auth_user_menu {
    position: absolute;
    top: 10px;
    right: 185px;
    /* Left of cart icon */
    z-index: 999;
}

.map_tour_control {
    right: 65px !important;
}

.language_menu {
    right: 120px !important;
}

.user-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3BADF9;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.user-avatar-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 200px;
    background: rgba(0, 8, 54, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.user-dropdown.active {
    display: block;
    animation: fadeIn 0.2s;
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: #ccc;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}

/* Orders List Styles */
.orders-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
}

.order-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-id {
    font-family: monospace;
    color: #aaa;
}

.order-status {
    padding: 4px 8px;
    height: fit-content;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
}

.status-paid {
    background: rgba(46, 241, 168, 0.2);
    color: #2EF1A8;
}

.status-pending {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.order-items-list {
    font-size: 13px;
    color: #ccc;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.order-pay-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background: #3BADF9;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .shop-auth-modal {
        padding: 32px 24px 28px;
        border-radius: 20px;
        max-width: 95%;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .auth-icon {
        width: 48px;
        height: 48px;
    }

    .auth-icon svg {
        width: 22px;
        height: 22px;
    }
}