/* ============================================================
   APDATIKNAS – Additional Features CSS
   Search Modal | WhatsApp Chatbot | Language Switcher
============================================================ */

/* ─── Nav Controls ──────────────────────────────────────── */
.nav-controls {
    display: flex; align-items: center; gap: 10px;
    margin-left: 8px;
}
.nav-search-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    color: rgba(255,255,255,.85);
    font-size: .9rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all .3s;
}
.nav-search-btn:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ─── Language Switcher ─────────────────────────────────── */
.lang-switcher {
    display: flex; align-items: center; gap: 2px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    padding: 4px 8px;
}
.lang-btn {
    font-size: .78rem; font-weight: 700;
    color: rgba(255,255,255,.5);
    background: none; border: none;
    padding: 2px 6px; border-radius: 5px;
    cursor: pointer;
    transition: all .25s;
    letter-spacing: .5px;
}
.lang-btn.active {
    background: #2563eb;
    color: #fff;
}
.lang-btn:hover:not(.active) { color: rgba(255,255,255,.85); }
.lang-sep { color: rgba(255,255,255,.25); font-size: .75rem; }

/* ─── Search Modal ──────────────────────────────────────── */
.search-modal {
    position: fixed; inset: 0;
    background: rgba(8,22,40,.95);
    backdrop-filter: blur(20px);
    z-index: 9998;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 80px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.search-modal.open {
    opacity: 1; visibility: visible; pointer-events: all;
}
.search-modal-inner {
    width: 100%; max-width: 760px;
    padding: 0 24px;
}
.search-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 28px;
}
.search-input-wrap {
    flex: 1;
    position: relative; display: flex; align-items: center;
    background: rgba(255,255,255,.08);
    border: 1.5px solid rgba(255,255,255,.2);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .3s;
}
.search-input-wrap:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.2);
}
.search-icon {
    padding: 0 16px;
    color: rgba(255,255,255,.4);
    font-size: 1.1rem; pointer-events: none;
}
.search-input {
    flex: 1;
    background: none; border: none;
    color: #fff; font-size: 1.1rem;
    padding: 16px 0;
    font-family: 'Inter', sans-serif;
    outline: none;
}
.search-input::placeholder { color: rgba(255,255,255,.3); }
.search-clear {
    padding: 0 16px;
    color: rgba(255,255,255,.4); font-size: 1rem;
    cursor: pointer; background: none; border: none;
    transition: color .2s;
}
.search-clear:hover { color: #fff; }
.search-close {
    display: flex; align-items: center; gap: 6px;
    color: rgba(255,255,255,.6);
    font-size: .85rem; font-weight: 600;
    background: none; border: none;
    padding: 8px 14px; border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.15);
    transition: all .2s;
}
.search-close:hover { background: rgba(255,255,255,.1); color: #fff; }
.search-results { max-height: 70vh; overflow-y: auto; }
.search-hint {
    display: flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,.35); font-size: .9rem;
    padding: 20px 0;
}
.search-hint i { color: #f59e0b; }
.search-result-item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px 18px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    cursor: pointer;
    text-decoration: none;
    transition: all .25s;
    animation: fadeIn .3s ease;
}
.search-result-item:hover {
    background: rgba(37,99,235,.15);
    border-color: rgba(37,99,235,.3);
    transform: translateX(4px);
}
.search-result-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    background: linear-gradient(135deg, #1a3a6b, #2563eb);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: rgba(255,255,255,.7);
}
.search-result-body { flex: 1; }
.search-result-title {
    font-weight: 600; color: #fff;
    font-size: .92rem; margin-bottom: 4px;
}
.search-result-title mark {
    background: rgba(37,99,235,.4);
    color: #93c5fd;
    border-radius: 3px; padding: 0 2px;
}
.search-result-desc { color: rgba(255,255,255,.45); font-size: .8rem; line-height: 1.6; }
.search-result-tag {
    display: inline-block;
    background: rgba(37,99,235,.2);
    color: #93c5fd;
    font-size: .68rem; font-weight: 600;
    padding: 2px 8px; border-radius: 99px;
    margin-top: 6px; text-transform: uppercase; letter-spacing: .5px;
}
.search-no-results {
    text-align: center; padding: 48px 0;
    color: rgba(255,255,255,.35);
}
.search-no-results i { font-size: 2.5rem; margin-bottom: 12px; display: block; }

/* ─── WhatsApp Chatbot ──────────────────────────────────── */
.wa-chat-wrap {
    position: fixed;
    bottom: 88px; right: 28px;
    z-index: 997;
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 12px;
}
.wa-float-btn {
    width: 58px; height: 58px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: #fff;
    box-shadow: 0 4px 20px rgba(37,211,102,.45);
    border: none; cursor: pointer;
    position: relative;
    transition: all .3s;
    animation: waPulse 2.5s ease infinite;
}
.wa-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(37,211,102,.55);
    animation: none;
}
@keyframes waPulse {
    0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.45); }
    50% { box-shadow: 0 4px 32px rgba(37,211,102,.7), 0 0 0 8px rgba(37,211,102,.12); }
}
.wa-badge {
    position: absolute; top: -4px; right: -4px;
    width: 20px; height: 20px;
    background: #e63333; color: #fff;
    font-size: .68rem; font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    animation: badgePop .4s ease;
}
@keyframes badgePop { from { transform: scale(0); } to { transform: scale(1); } }

/* WA Popup */
.wa-popup {
    width: 320px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0,0,0,.2);
    overflow: hidden;
    transform: scale(0.85) translateY(20px);
    transform-origin: bottom right;
    opacity: 0; pointer-events: none;
    transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.wa-popup.open {
    transform: scale(1) translateY(0);
    opacity: 1; pointer-events: all;
}
.wa-popup-header {
    background: linear-gradient(135deg, #075e54, #128c7e);
    padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
}
.wa-popup-avatar {
    width: 44px; height: 44px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff; flex-shrink: 0;
}
.wa-popup-info { flex: 1; }
.wa-popup-name { display: block; color: #fff; font-weight: 700; font-size: .95rem; }
.wa-popup-status {
    display: flex; align-items: center; gap: 4px;
    font-size: .72rem; color: rgba(255,255,255,.75);
}
.wa-popup-status i { font-size: .5rem; color: #4ade80; }
.wa-popup-close {
    background: rgba(255,255,255,.15); border: none;
    width: 28px; height: 28px; border-radius: 50%;
    color: rgba(255,255,255,.8);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: .8rem;
    transition: background .2s;
}
.wa-popup-close:hover { background: rgba(255,255,255,.25); }
.wa-popup-body {
    padding: 16px;
    background: #ece5dd;
    min-height: 180px;
}
.wa-bubble {
    background: #fff;
    border-radius: 0 12px 12px 12px;
    padding: 12px 14px;
    font-size: .85rem; color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.wa-bubble p { margin-bottom: 6px; }
.wa-bubble p:last-child { margin-bottom: 0; }
.wa-quick-btns {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 12px;
}
.wa-quick-btn {
    background: #fff;
    border: 1.5px solid #25d366;
    color: #075e54;
    font-size: .78rem; font-weight: 600;
    padding: 6px 12px; border-radius: 99px;
    cursor: pointer;
    transition: all .2s;
    line-height: 1.3;
    text-align: left;
}
.wa-quick-btn:hover {
    background: #25d366; color: #fff;
    border-color: #25d366;
}
.wa-input-row {
    display: flex; gap: 8px; align-items: center;
    background: #fff;
    border-radius: 30px;
    padding: 6px 6px 6px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.wa-input {
    flex: 1; border: none; background: none;
    font-size: .85rem; color: #333;
    outline: none; font-family: 'Inter', sans-serif;
}
.wa-input::placeholder { color: #aaa; }
.wa-send-btn {
    width: 36px; height: 36px;
    background: #25d366; border: none;
    border-radius: 50%;
    color: #fff; font-size: .9rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s;
    flex-shrink: 0;
}
.wa-send-btn:hover { background: #128c7e; }

/* ─── Map Label ─────────────────────────────────────────── */
.map-label {
    font-size: .82rem; font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}
.map-label i { color: var(--blue-accent); }

/* ─── Responsive additions ──────────────────────────────── */
@media (max-width: 900px) {
    .nav-controls { order: -1; }
    .wa-popup { width: 290px; }
}
@media (max-width: 640px) {
    .search-modal { padding-top: 70px; }
    .search-input { font-size: .95rem; }
    .wa-chat-wrap { bottom: 80px; right: 16px; }
    .wa-float-btn { width: 52px; height: 52px; font-size: 1.4rem; }
    .nav-controls { gap: 6px; }
    .lang-btn { font-size: .72rem; padding: 2px 4px; }
}
