/* ============================================================ */

/* ZónaNet Modern Stylesheet */

/* ============================================================ */



*, *::before, *::after {

    box-sizing: border-box;

}



html, body {

    overflow-x: hidden;

    max-width: 100vw;

}



html {

    scroll-behavior: smooth;

}

/* Modal Active: Strict Scroll Lock */

html.modal-open,

body.modal-open {

    overflow: hidden !important;

    overscroll-behavior: none !important;

}



/* Modals backdrop and overscroll containment */

.fixed.z-50,

.fixed.z-\[100\],

[id$="-modal"],

#esim-compatibility-modal,

#terms-modal,

#privacy-modal,

#impressum-modal,

#countries-modal,

#esim-status-modal,

#qr-modal,

#auth-modal,

#delivery-notice-modal,

#widget-guide-modal,

#map-modal,

#ai-chat-window,

#ai-chat-messages {

    overscroll-behavior: contain !important;

    -webkit-overflow-scrolling: touch;

}



/* Modal scrollable bodies */

[id$="-modal"] .overflow-y-auto,

#esim-compatibility-modal .overflow-y-auto,

#terms-modal-body-content,

#privacy-modal-body-content,

#impressum-modal-body-content,

#compat-modal-list,

#countries-list,

.modal-scrollable {

    overscroll-behavior: contain !important;

    touch-action: pan-y !important;

}





/* Base typography & rendering smoothing */

body {

    -webkit-font-smoothing: antialiased;

    -moz-osx-font-smoothing: grayscale;

}



.view-section {

    display: none;

    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);

}



.view-section.active {

    display: block;

}



@keyframes fadeIn {

    from { 

        opacity: 0; 

        transform: translateY(8px); 

    }

    to { 

        opacity: 1; 

        transform: translateY(0); 

    }

}



/* Glassmorphic Navbar & Panels */

.glass-panel {

    background: rgba(255, 255, 255, 0.85);

    backdrop-filter: blur(12px);

    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255, 255, 255, 0.4);

}



/* Country Card Hover */

.country-card {

    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;

    border: 1px solid rgba(229, 231, 235, 0.9);

}



.country-card:hover {

    transform: translateY(-4px);

    box-shadow: 0 12px 24px -4px rgba(59, 130, 246, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.04);

    border-color: #3b82f6;

}



/* Package Card */

.package-card {

    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;

    border: 2px solid transparent;

}



.package-card:hover {

    transform: translateY(-3px);

    border-color: #3b82f6;

    box-shadow: 0 16px 30px -6px rgba(59, 130, 246, 0.15), 0 6px 12px -3px rgba(0, 0, 0, 0.05);

}



/* Buttons micro-interactions */

button:not(:disabled), a.inline-block {

    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

}



button:not(:disabled):active {

    transform: scale(0.98);

}



/* Toast Animation */

#toast {

    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;

}



#toast.show {

    transform: translateY(0);

    opacity: 1;

}



/* Custom Scrollbar for packages or large lists */

::-webkit-scrollbar {

    width: 7px;

    height: 7px;

}



::-webkit-scrollbar-track {

    background: rgba(241, 245, 249, 0.8);

    border-radius: 4px;

}



::-webkit-scrollbar-thumb {

    background: #cbd5e1;

    border-radius: 4px;

}



::-webkit-scrollbar-thumb:hover {

    background: #94a3b8;

}



/* Code box 6-digit inputs */

.code-box-input {

    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;

}



.code-box-input:focus {

    transform: translateY(-2px);

    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);

}



/* ============================================================ */

/* AI CHAT ÉS TICKET WIDGET STÍLUSOK */

/* ============================================================ */



#ai-chat-window.show {

    display: flex !important;

    animation: chatOpen 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;

}



@keyframes chatOpen {

    from {

        opacity: 0;

        transform: translateY(30px) scale(0.92);

    }

    to {

        opacity: 1;

        transform: translateY(0) scale(1);

    }

}



#ai-chat-window.hide {

    animation: chatClose 0.25s ease-in-out forwards;

}



@keyframes chatClose {

    from {

        opacity: 1;

        transform: translateY(0) scale(1);

        display: flex;

    }

    to {

        opacity: 0;

        transform: translateY(20px) scale(0.95);

        display: none !important;

    }

}



/* Chat Message Bubbles */

.chat-msg-user {

    background: linear-gradient(135deg, #2563eb, #4f46e5);

    color: white;

    border-radius: 18px 18px 2px 18px;

    align-self: flex-end;

    box-shadow: 0 4px 12px -2px rgba(79, 70, 229, 0.25);

    max-width: 85%;

    padding: 10px 14px;

    font-size: 0.875rem;

    line-height: 1.4;

}



.chat-msg-ai {

    background: #ffffff;

    color: #1e293b;

    border-radius: 18px 18px 18px 2px;

    align-self: flex-start;

    border: 1px solid rgba(226, 232, 240, 0.9);

    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.05);

    max-width: 85%;

    padding: 10px 14px;

    font-size: 0.875rem;

    line-height: 1.4;

}



/* Typing Indicator Animation */

.typing-dots {

    display: inline-flex;

    align-items: center;

    gap: 4px;

    padding: 8px 12px;

}



.typing-dot {

    width: 6px;

    height: 6px;

    background-color: #94a3b8;

    border-radius: 50%;

    animation: bounce 1.2s infinite ease-in-out;

}



.typing-dot:nth-child(2) {

    animation-delay: 0.2s;

}



.typing-dot:nth-child(3) {

    animation-delay: 0.4s;

}



@keyframes bounce {

    0%, 80%, 100% {

        transform: translateY(0);

    }

    40% {

        transform: translateY(-6px);

    }

}



/* Chat Scrollbar */

#ai-chat-messages::-webkit-scrollbar {

    width: 5px;

}



#ai-chat-messages::-webkit-scrollbar-track {

    background: transparent;

}



#ai-chat-messages::-webkit-scrollbar-thumb {

    background: #e2e8f0;

    border-radius: 3px;

}



#ai-chat-messages::-webkit-scrollbar-thumb:hover {

    background: #cbd5e1;

}



/* Pulse animation for bubble status */

@keyframes pulseGlow {

    0% {

        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);

    }

    70% {

        box-shadow: 0 0 0 14px rgba(37, 99, 235, 0);

    }

    100% {

        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);

    }

}



#ai-chat-bubble {

    animation: pulseGlow 2.5s infinite;

}



/* Quick Search Chip Hover */

.quick-chip {

    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

}



.quick-chip:hover {

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.15);

}



/* Package Price Display */

.price-display {

    letter-spacing: -0.03em;

}



/* Auth button text: desktop shows "Bejelentkezés", mobile shows "Belépés" */
.auth-btn-mobile-text {
    display: none !important;
}
.auth-btn-desktop-text {
    display: inline !important;
}

/* Mobile screens (< 640px): single blue "Belépés" button on mobile, hide "Regisztráció" */
@media (max-width: 639px) {
    #auth-menu:not(.user-logged-in) {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    /* On mobile: switch login button text to "Belépés" */
    .auth-btn-mobile-text {
        display: inline !important;
    }
    .auth-btn-desktop-text {
        display: none !important;
    }

    /* On mobile: hide register button */
    #auth-menu #btn-show-register {
        display: none !important;
    }

    /* On mobile: single blue button with white text */
    #auth-menu #btn-show-login:not(.hidden) {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-color: #2563eb !important;
        color: #ffffff !important;
        border: 1px solid #2563eb !important;
        border-radius: 0.75rem !important;
        padding: 6px 14px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
        white-space: nowrap !important;
    }

    #auth-menu #btn-show-login:not(.hidden):hover {
        background-color: #1d4ed8 !important;
        border-color: #1d4ed8 !important;
        color: #ffffff !important;
    }
}

/* Ensure hidden or logged-in auth elements stay completely hidden */
#auth-menu #btn-show-register.hidden,
#auth-menu #btn-show-login.hidden,
#btn-show-register.hidden,
#btn-show-login.hidden,
#auth-menu.user-logged-in #btn-show-register,
#auth-menu.user-logged-in #btn-show-login {
    display: none !important;
}

@media (max-width: 420px) {
    .code-box-container {
        gap: 2px !important;
    }

    .code-box-input {
        width: 32px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
}



/* ============================================================

   PRINT STYLES (PDF Nyomtatási optimalizáció)

   ============================================================ */

@page {

    margin: 15mm;

}

@media print {

    #bg-image-layer,

    #bg-video-container,

    nav,

    footer,

    #cookie-banner,

    #chat-widget-container,

    #toast,

    #comparison-active-banner {

        display: none !important;

    }

}



/* Sticky Footer Setup */

html {

    height: 100%;

}

body {

    min-height: 100vh;

    display: flex;

    flex-direction: column;

}

#main-content {

    flex: 1 0 auto;

}

footer {

    margin-top: auto;

}



/* Compat Hero Results Glowing Cyan Scrollbar */

#compat-hero-results::-webkit-scrollbar {

    width: 6px;

}

#compat-hero-results::-webkit-scrollbar-track {

    background: rgba(15, 23, 42, 0.5);

    border-radius: 4px;

}

#compat-hero-results::-webkit-scrollbar-thumb {

    background: rgba(56, 189, 248, 0.4);

    border-radius: 4px;

}

#compat-hero-results::-webkit-scrollbar-thumb:hover {

    background: rgba(56, 189, 248, 0.8);

}

