/* class.direction.css - Core styles for Direction class features */

/* Floating Language Switcher */
.lang-floater {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    min-width: 200px;
}

/* Current Language Container */
.lang-current {
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 10px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    width: 100%;
}

.lang-current:hover {
    background-color: #333;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.lang-current img.flag-icon {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.lang-current span {
    font-weight: 600;
    flex-grow: 1;
}

/* Dropdown Arrow */
.lang-current::after {
    content: '▼';
    font-size: 10px;
    color: #888;
}

/* Dropdown List */
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 4px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lang-floater:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #ccc;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid #2a2a2a;
}

.lang-dropdown a:last-child {
    border-bottom: none;
}

.lang-dropdown a:hover {
    background-color: #333;
    color: #fff;
    padding-left: 20px; 
}

.lang-dropdown img.flag-icon {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

/* --- AJAX Message Window / Modal --- */
.dir-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.dir-message-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dir-message-window {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #eee;
}

.dir-message-overlay.active .dir-message-window {
    transform: scale(1);
}

.dir-message-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.dir-message-icon.success { color: #28a745; }
.dir-message-icon.error { color: #dc3545; }
.dir-message-icon.info { color: #1a1a1a; }

.dir-message-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.dir-message-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.dir-btn-close {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.dir-btn-close:hover {
    background: #333;
}

/* Captcha Loader / Spinner */
.captcha-loading {
    opacity: 0.5;
    pointer-events: none;
    filter: blur(2px);
}

/* Mobile Fix: Reposition lang-floater to bottom-right to avoid overlapping the hamburger menu */
@media (max-width: 900px) {
    .lang-floater {
        top: auto;
        bottom: 20px;
        right: 20px;
    }
    
    .lang-dropdown {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 4px;
        transform: translateY(5px);
    }
    
    .lang-floater:hover .lang-dropdown {
        transform: translateY(0);
    }
}
