/* Font Face Declaration */
@font-face {
    font-family: 'Proxima Nova';
    src: url('../fonts/Proxima_nova_RG.ttf') format('truetype');
}

/* Base styles */
a {
    cursor: pointer;
}

/* Navbar integration styles */
#kh-login-button-container {
    display: inline-block;
    margin: 0;
    padding: 0;
}

/* Navigation item wrapper */
.kh-nav-item {
    list-style: none !important;
    display: inline-block;
    margin: 0 0 0 1rem;
    padding: 0;
    vertical-align: middle;
}

.kh-nav-item:before,
.kh-nav-item:after {
    display: none !important;
}

/* Main button - Angular Tailwind equivalent */
.kh-login-btn {
    /* Angular: border border-[#fff35e] bg-[#fff35e] hover:bg-[#f5e959] rounded-sm px-4 py-2 font-bold transition-colors duration-200 cursor-pointer select-none */
    border: 1px solid #fff35e !important;
    background-color: #fff35e;
    color: #000000;
    border-radius: 0.125rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    transition: background-color 200ms;
    cursor: pointer;
    user-select: none;
    
    /* Typography */
    font-family: 'Proxima Nova', Arial, sans-serif;
    font-size: 16px;
    
    /* Display */
    display: inline-block;
    text-decoration: none !important;
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
    line-height: 1.4;
    vertical-align: middle;
    
    /* Underline effect setup */
    position: relative;
    
    /* Override theme styles */
    box-shadow: none !important;
    text-transform: none;
    letter-spacing: normal;
    background-image: none !important;
    text-shadow: none !important;
    
    /* Remove all focus/click effects */
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    
    /* Force remove any extra borders */
    border-top: 1px solid #fff35e !important;
    border-right: 1px solid #fff35e !important;
    border-bottom: 1px solid #fff35e !important;
    border-left: 1px solid #fff35e !important;
}

/* Hover background color change */
.kh-login-btn:hover,
.kh-login-btn:focus {
    background-color: #f5e959;
    border-color: #f5e959;
    color: #000000;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Remove focus outline on active/click */
.kh-login-btn:active,
.kh-login-btn:focus:active {
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid #f5e959 !important;
    background-color: #f5e959 !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Underline hover effect */
.kh-login-btn::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 16px;
    width: 0;
    height: 2px;
    background-color: black;
    transition: width 0.1s linear;
}

.kh-login-btn:hover::before {
    width: 20px;
}

/* Loading state */
.kh-login-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Error state */
.kh-login-btn.error {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    color: white !important;
}

.kh-login-btn.error:hover {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* Navigation wrapper */
#kh-user-dropdown {
    position: relative;
    display: inline-block;
}

.nav-item-wrapper {
    position: relative;
    display: inline-block;
}

#kh-dropdown {
    position: absolute !important;
    top: 100px !important;
    left: 0 !important;
    background: #F3F2F8 !important;
    padding: 20px 15px !important;
    margin-left: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(120px) !important;
    transition: all 0.3s ease !important;
    z-index: 999999 !important;
    display: block !important;
    min-width: 180px !important;
    width: auto !important;
    white-space: nowrap !important;
}

#kh-dropdown::before {
    content: '';
    display: block;
    position: absolute;
    top: -30px; /* Καλύπτει το gap από το username */
    left: 0;
    right: 0;
    height: 50px; /* Ίδιο με το translateY */
    background: transparent;
    z-index: 1;
}

/* Show dropdown on hover */
#kh-user-dropdown:hover #kh-dropdown,
.nav-item-wrapper:hover #kh-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Keep dropdown visible when hovering over dropdown ή το invisible bridge */
#kh-dropdown:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* 🔥 EXTENDED HOVER AREA για το parent wrapper */
#kh-user-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 60px; /* Ίδιο με το gap */
    background: transparent;
    z-index: 999998; /* Κάτω από το dropdown αλλά πάνω από τα άλλα */
}

/* Dropdown items */
.dropdown-item {
    display: block;
    padding: 10px 15px;
    font-size: 16px;
    color: black;
    transition: all 0.1s linear;
    text-decoration: none;
    position: relative;
    font-weight: bolder;
    font-family: 'Proxima Nova', Arial, sans-serif;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    line-height: 1.4;
}

.dropdown-item:hover {
    color: black;
    text-decoration: none;
    background: transparent;
}

.dropdown-item:focus {
    color: black;
    outline: none;
    background: transparent;
}

/* Dropdown item underline effect */
.dropdown-item::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 16px;
    width: 0;
    height: 2px;
    background-color: black;
    transition: width 0.1s linear;
}

.dropdown-item:hover::before {
    width: 20px;
}

/* Mobile styles - Hide by default */
#kh-mobile-login-container {
    display: none !important;
}

/* Mobile breakpoint - LESS than 768px */
@media (max-width: 767px) {
    /* Hide desktop version on mobile */
    #kh-login-button-container {
        display: none !important;
    }
    
    /* Show mobile version */
    #kh-mobile-login-container {
        display: block !important;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 9999;
    }
    
    /* Mobile login button */
    .kh-mobile-login-btn {
        border: 1px solid #fff35e;
        background-color: #fff35e;
        color: #000000;
        border-radius: 0.125rem;
        padding: 0.5rem 1rem;
        font-weight: 700;
        transition: background-color 200ms;
        font-size: 16px;
        font-family: 'Proxima Nova', Arial, sans-serif;
        cursor: pointer;
        text-decoration: none;
        display: inline-block;
        min-width: 60px;
        text-align: center;
        box-shadow: none !important;
        background-image: none !important;
        text-shadow: none !important;
        outline: none !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
    }
    
    .kh-mobile-login-btn:hover,
    .kh-mobile-login-btn:focus,
    .kh-mobile-login-btn:active {
        background-color: #f5e959;
        border-color: #f5e959;
        text-decoration: none;
        outline: none !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .kh-mobile-login-btn.logged-in {
        min-width: 100px;
    }
    
    .kh-mobile-login-btn.loading {
        opacity: 0.7;
        cursor: not-allowed;
    }
    
    .kh-mobile-login-btn.error {
        background-color: #ef4444;
        border-color: #ef4444;
        color: white;
    }
}

/* Desktop breakpoint - 768px and above */
@media (min-width: 768px) {
    #kh-mobile-login-container {
        display: none !important;
    }
    
    #kh-login-button-container {
        display: inline-block !important;
    }
}

/* Mobile Menu Styles */
.dropdown-item-wrapper {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
}

.dropdown-item-wrapper:last-child {
    margin-bottom: 0;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    gap: 0.5rem;
}

.mobile-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.75s ease;
    opacity: 0;
    padding-left: 2rem;
    margin-top: 0.5rem;
}

.dropdown-item-wrapper:hover .mobile-dropdown {
    max-height: 500px;
    opacity: 1;
}

.mobile-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-dropdown ul li {
    margin: 0.75rem 0;
}

.mobile-dropdown ul li a {
    display: block;
    padding: 6px 0;
    font-size: 16px;
    font-weight: bolder;
    transition: 0.2s;
    color: #aca6d2;
    text-decoration: none;
    font-family: 'Proxima Nova', Arial, sans-serif;
}

.mobile-dropdown ul li a:hover {
    font-weight: 600;
    text-decoration: none;
}

.mobile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: #F0EFF5;
    border-radius: 3px;
    padding: 2px;
    flex-shrink: 0;
}

/* Fallback positioning */
.kh-fallback-fixed {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    #kh-mobile-login-container {
        top: 10px;
        right: 10px;
    }
    
    .kh-mobile-login-btn {
        padding: 0.375rem 0.75rem;
        font-size: 14px;
        min-width: 50px;
    }
    
    .kh-mobile-login-btn.logged-in {
        min-width: 80px;
    }
}

/* Print styles */
@media print {
    #kh-login-button-container,
    #kh-mobile-login-container {
        display: none !important;
    }
}