/**
 * Main CSS
 */

/* Cairo Font - Default for all plugin elements */
.hme-container,
.hme-container *,
[class*="hme-"] {
    font-family: 'Cairo', sans-serif;
}

/* General Enhancements */
* {
    box-sizing: border-box;
}

/* Utility classes */
.hme-hidden {
    display: none !important;
}

.hme-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Typography */
.hme-heading {
    font-weight: 700;
    color: #1a1a1a;
}

/* Buttons */
.hme-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hme-btn-primary {
    background: #007bff;
    color: #fff;
}

.hme-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.hme-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.hme-btn-secondary:hover {
    background: #545b62;
}

/* Cards */
.hme-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.hme-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Responsive utilities */
@media (max-width: 1024px) {
    .hme-hide-tablet {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hme-hide-mobile {
        display: none !important;
    }

    .hme-btn {
        width: 100%;
    }
}

/* Accessibility */
.hme-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hme-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Custom scrollbar */
.hme-custom-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.hme-custom-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.hme-custom-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.hme-custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Header Extras (Flag & Currency) */
.hme-header-extras {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px 15px;
    margin-right: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.site-header .hme-header-extras {
    /* order: -1; */
    /* Ensure it appears early in flex containers */
    margin-right: 0;
    margin-left: 15px;
}

/* Flag */
.hme-country-flag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.hme-country-flag img {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Currency Switcher */
.hme-currency-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hme-currency-switcher button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.hme-currency-switcher button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.hme-currency-switcher button.active {
    color: #1a1a1a;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hme-header-extras {
        position: fixed;
        top: 80px;
        right: 15px;
        z-index: 999;
        background: rgba(0, 0, 0, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(12px);
    }

    .hme-country-flag span {
        display: none;
    }

    .hme-country-flag {
        padding-right: 10px;
    }
}

/* Group Discount Badge (Global Injection support) */
.category-trip-fig {
    position: relative !important;
    overflow: hidden !important;
}

.hme-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: hme-badge-pulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 50;
    line-height: 1;
}

.hme-discount-badge svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.hme-discount-badge-injected {
    position: absolute;
    top: 10px;
    left: 10px;
}

@keyframes hme-badge-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 3px 12px rgba(255, 107, 107, 0.5);
    }
}

/* Authentication Modal Premium Styling */
.hme-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hme-modal.active {
    opacity: 1;
    visibility: visible;
}

.hme-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hme-modal-content {
    position: relative;
    max-width: 480px;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hme-modal.active .hme-modal-content {
    transform: translateY(0) scale(1);
}

.hme-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.hme-modal-close:hover {
    background: #e9ecef;
    color: #000;
    transform: rotate(90deg);
}

.hme-modal-content h2 {
    font-size: 28px;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}

.hme-modal-content>p {
    color: #666;
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Social Login */
.hme-social-login {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.hme-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border: 1.5px solid #e9ecef;
    border-radius: 12px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hme-social-btn:hover {
    background: #f8f9fa;
    border-color: #ced4da;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hme-social-btn svg {
    width: 20px;
    height: 20px;
}

.hme-apple-btn {
    background: #000;
    color: #fff;
    border: none;
}

.hme-apple-btn:hover {
    background: #333;
}

/* Auth Divider */
.hme-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.hme-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.hme-divider span {
    position: relative;
    background: #fff;
    padding: 0 15px;
    color: #adb5bd;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Styles */
.hme-login-form .hme-form-group {
    margin-bottom: 20px;
}

.hme-form-row {
    display: flex;
    gap: 15px;
}

.hme-login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hme-login-form input[type="text"],
.hme-login-form input[type="email"],
.hme-login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.hme-login-form input:focus {
    outline: none;
    background: #fff;
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.hme-login-form .hme-btn-primary {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
}

.hme-form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    font-size: 14px;
    color: #6c757d;
}

.hme-form-footer a {
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
}

.hme-form-footer a:hover {
    text-decoration: underline;
}

.hme-auth-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: hme-shake 0.4s ease;
}

@keyframes hme-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.hme-auth-message.error {
    background: #fff5f5;
    color: #e03131;
    border: 1px solid #ffc9c9;
}

.hme-auth-message.success {
    background: #ebfbee;
    color: #2f9e44;
    border: 1px solid #b2f2bb;
}

@media (max-width: 576px) {
    .hme-modal-content {
        padding: 30px 20px;
    }

    .hme-form-row {
        flex-direction: column;
        gap: 0;
    }

    .hme-modal-content h2 {
        font-size: 24px;
    }
}

/* Hide Terms & Conditions links */
.hme-terms-checkout-link,
.hme-terms-link,
.footer-inf .hme-terms-link,
.footer-inf a.hme-terms-link,
.footer-inf li .hme-terms-link,
nav.footer-inf .hme-terms-link,
nav.footer-inf li .hme-terms-link {
    display: none !important;
}

/* Hide the entire list item if it only contains Terms link */
.footer-inf li:has(.hme-terms-link) {
    display: none !important;
}
