/* ===================================================================
   Zemra v3.15 - Geschenke, Online/Tippt, Suche
   =================================================================== */

/* ===== Geschenk-Button + Picker ===== */
.chat-gift-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 8px 6px;
    line-height: 1;
}
.chat-gift-btn:hover { transform: scale(1.15); }

.zemra-gift-picker {
    position: absolute;
    bottom: 70px;
    left: 12px; right: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 50;
    max-width: 420px;
    margin: 0 auto;
}
.zemra-gift-picker-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    color: #1a1a1a;
    text-align: center;
}
.zemra-gift-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.zemra-gift-item {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 10px 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.15s;
}
.zemra-gift-item:hover {
    background: #fff5f7;
    border-color: #ff4458;
    transform: translateY(-2px);
}
.zemra-gift-item-emoji { font-size: 26px; line-height: 1; }
.zemra-gift-item-name { font-size: 10px; color: #6b7280; }

/* Geschenk-Nachricht im Chat */
.zemra-gift-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 12px auto;
    padding: 16px 24px;
    background: linear-gradient(135deg, #fff5f7, #ffe4ec);
    border-radius: 20px;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(255,68,88,0.12);
}
.zemra-gift-message.sent { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.zemra-gift-emoji {
    font-size: 56px;
    line-height: 1;
    animation: zemraGiftPop 0.5s ease;
}
.zemra-gift-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 600;
}
@keyframes zemraGiftPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Flieg-Animation beim Senden */
.zemra-gift-fly {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    z-index: 99999;
    pointer-events: none;
    opacity: 1;
    transition: all 1.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.zemra-gift-fly.is-flying {
    bottom: 60%;
    opacity: 0;
    transform: translateX(-50%) scale(2.5) rotate(20deg);
}

/* ===== Online-Status + Tippt ===== */
.chat-status-line {
    font-size: 12px;
    color: #10b981;
    margin-top: 2px;
    min-height: 16px;
}
.zemra-online-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 4px;
}
.zemra-typing { color: #6b7280; font-style: italic; }
.zemra-typing-dots span {
    animation: zemraBlink 1.4s infinite both;
    font-weight: 700;
}
.zemra-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.zemra-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes zemraBlink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

/* ===== Suche & Filter ===== */
.zemra-search {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px;
}
.zemra-search-filters {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}
.zemra-search-filters h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #1a1a1a;
}
.zemra-search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.zemra-search-field { flex: 1; }
.zemra-search-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}
.zemra-search-field input,
.zemra-search-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #fafafa;
}
.zemra-search-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 14px 0;
}
.zemra-search-checks label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}
.zemra-search-checks input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #ff4458;
}
.zemra-search-btn { width: 100%; }

.zemra-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.zemra-search-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    display: block;
}
.zemra-search-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.zemra-search-photo {
    position: relative;
    aspect-ratio: 1;
    background: #f3f4f6;
}
.zemra-search-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.zemra-search-nophoto {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 48px; color: #d1d5db;
}
.zemra-search-online {
    position: absolute;
    bottom: 8px; right: 8px;
    width: 14px; height: 14px;
    background: #10b981;
    border: 2px solid #fff;
    border-radius: 50%;
}
.zemra-search-info { padding: 10px 12px; }
.zemra-search-name {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
}
.zemra-search-verified { color: #3b82f6; }
.zemra-search-sub {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}
.zemra-search-loading, .zemra-search-empty {
    text-align: center;
    color: #9ca3af;
    padding: 40px 16px;
}

@media (max-width: 768px) {
    .zemra-gift-grid { grid-template-columns: repeat(4, 1fr); }
    .zemra-search-grid { grid-template-columns: repeat(2, 1fr); }
    .zemra-search-row { flex-direction: column; gap: 8px; }
}

/* ===================================================================
   Globale Bottom-Navigation
   =================================================================== */
.zemra-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    z-index: 9000;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.zemra-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    text-decoration: none;
    color: #6b7280;
    font-size: 11px;
    transition: color 0.15s;
    position: relative;
}
.zemra-bottom-nav-item:hover { color: #ff4458; }
.zemra-bottom-nav-item.is-active { color: #ff4458; }
.zemra-bottom-nav-item.is-active .zemra-bottom-nav-label { font-weight: 700; }

.zemra-bottom-nav-icon {
    font-size: 22px;
    line-height: 1;
    position: relative;
}
.zemra-bottom-nav-label {
    font-size: 11px;
    white-space: nowrap;
}

/* "Mein Profil" hervorgehoben */
.zemra-bottom-nav-item.is-highlight .zemra-bottom-nav-icon {
    background: linear-gradient(135deg, #ff4458, #ff6b81);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    box-shadow: 0 2px 8px rgba(255,68,88,0.35);
    font-size: 20px;
}
.zemra-bottom-nav-item.is-highlight { color: #ff4458; }
.zemra-bottom-nav-item.is-highlight .zemra-bottom-nav-label { font-weight: 700; }

/* Badge für Chats */
.zemra-bottom-nav-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ff4458;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

/* Platz schaffen, damit Inhalt nicht hinter der Nav verschwindet */
body.zemra-has-bottom-nav { padding-bottom: 70px; }

@media (min-width: 900px) {
    /* Auf Desktop schmaler/zentriert */
    .zemra-bottom-nav {
        max-width: 500px;
        margin: 0 auto;
        border-radius: 16px 16px 0 0;
        border: 1px solid #e5e7eb;
        border-bottom: none;
    }
}
