/* --- SIFIRLAMA VE DEĞİŞKENLER --- */
:root {
    --primary: #2563eb;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-heavy: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.12);
    --text-main: #1e293b;
    --text-sub: #64748b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --radius-xl: 24px;
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);
}

html, body { height: 100%; width: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; }
body { font-family: 'Inter', sans-serif; background: #f8fafc; color: var(--text-main); -webkit-font-smoothing: antialiased; }

.app-container { position: fixed; width: 100%; height: 100%; display: flex; flex-direction: column; }
#map { width: 100%; height: 100%; z-index: 1; background-color: #e5e7eb; will-change: transform; }

/* --- PUSULA BUTONU (Premium) --- */
.recenter-btn {
    position: fixed; bottom: calc(110px + var(--safe-area-bottom)); right: 20px;
    width: 50px; height: 50px; 
    background: var(--bg-glass-heavy); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); border-radius: 50%; box-shadow: var(--glass-shadow); 
    color: var(--primary); display: flex; align-items: center; justify-content: center;
    z-index: 10000 !important; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer; opacity: 0; transform: scale(0.5); pointer-events: none;
}
.recenter-btn.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.recenter-btn.compass-active { background: var(--primary); color: white; border-color: var(--primary); transform: scale(1.1); box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4); }
.compass-arrow { font-size: 22px; display: block; line-height: 1; transition: transform 0.1s ease-out; }

/* --- LIQUID GLASS MODALS (Uyarı, Onay, Öneri) --- */
.glass-overlay, #consent-overlay, #suggestion-overlay { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; /* Tam ekran kaplaması garanti altına alındı */
    background: rgba(248, 250, 252, 0.6); /* Logoyu daha net göstermesi için hafif aydınlık cam efekti */
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 10000; display: flex; align-items: center; justify-content: center; 
    transition: opacity 0.3s;
}
#suggestion-overlay { z-index: 11000; display: none; }

.glass-modal, .consent-modal, .suggestion-modal { 
    background: rgba(255, 255, 255, 0.95); padding: 30px; width: 90%; max-width: 360px; 
    border-radius: var(--radius-xl); text-align: center; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); border: 1px solid rgba(255, 255, 255, 0.8);
    margin: auto; /* iOS/Safari için ekstra ortalama garantisi */
}
.modal-icon { font-size: 3rem; margin-bottom: 10px; }

/* Formlar ve Butonlar */
.suggestion-input, .suggestion-textarea { 
    width: 100%; padding: 12px; margin: 10px 0; border: 1px solid rgba(0,0,0,0.1); 
    border-radius: 12px; font-size: 0.95rem; background: rgba(255,255,255,0.7); outline: none; transition: 0.3s;
}
.suggestion-input:focus, .suggestion-textarea:focus { background: #fff; border-color: var(--primary); }
.suggestion-textarea { min-height: 70px; resize: none; }
.suggestion-buttons { display: flex; gap: 10px; margin-top: 10px; }
.btn-submit, #accept-consent-btn { flex: 1; background: var(--primary); color: white; padding: 14px; border-radius: 14px; border: none; font-weight: 600; cursor: pointer; transition: 0.2s; width: 100%; }
.btn-submit:disabled, #accept-consent-btn:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-close { flex: 1; background: rgba(255,255,255,0.6); color: var(--text-main); padding: 12px; border-radius: 12px; border: 1px solid var(--glass-border); font-weight: 600; cursor: pointer; }

/* --- KURUMSAL LOGO STİLLERİ --- */
.welcome-logo {
    width: 140px;
    height: auto;
    margin: 0 auto 15px auto;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.08));
}

.panel-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.panel-mini-logo {
    width: 24px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* --- NAVİGASYON BANNER --- */
.instruction-banner {
    position: absolute; top: 16px; left: 50%; transform: translateX(-50%) translateY(-150%);
    width: 90%; max-width: 400px;
    background: var(--bg-glass-heavy); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 14px 18px; border-radius: 20px; border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    z-index: 1001; display: flex; justify-content: space-between; align-items: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.instruction-banner.active { transform: translateX(-50%) translateY(0); }
.nav-info { display: flex; flex-direction: column; }
.nav-dist { font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.nav-instruction { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.95rem; margin-top: 4px; color: var(--text-main); }
.nav-meta { font-size: 0.75rem; color: var(--text-sub); margin-top: 2px; }
.btn-cancel { background: #fee2e2; color: var(--danger); border: none; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 0.9rem; cursor: pointer; }

/* --- ALT PANEL (Kompakt Liquid Glass) --- */
.info-panel {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 85vh;
    background: var(--bg-glass-heavy); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000; border-radius: var(--radius-xl) var(--radius-xl) 0 0; border-top: 1px solid var(--glass-border);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.1);
    transform: translateY(calc(100% - 95px - var(--safe-area-bottom)));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; overscroll-behavior: contain; 
}
.info-panel.is-open { transform: translateY(0); }
.panel-header { padding: 12px 15px; text-align: center; cursor: grab; flex-shrink: 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.panel-grip { width: 35px; height: 4px; background: rgba(0,0,0,0.2); border-radius: 10px; margin: 0 auto 8px; }
.panel-title { font-size: 1.05rem; font-weight: 700; color: var(--text-main); }
.panel-content { flex: 1; overflow-y: auto; padding: 15px 15px 40px; -webkit-overflow-scrolling: touch; }

/* Arama Kutusu ve Sayaç */
.search-box input { 
    width: 100%; padding: 12px 16px; border: 1px solid rgba(255,255,255,0.8); border-radius: 14px; 
    background: rgba(255,255,255,0.5); box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); outline: none; margin-bottom: 10px; transition: 0.3s; color: var(--text-main);
}
.search-box input:focus { background: #fff; border-color: var(--primary); }
.route-counter { text-align: center; font-size: 0.85rem; color: var(--text-sub); margin-bottom: 10px; }

/* Kompakt Lokasyon Kartları */
.location-item { 
    display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 8px; 
    background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.7); border-radius: 14px; 
    cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.location-item:active { transform: scale(0.98); background: rgba(255,255,255,0.9); }
.location-item-icon { font-size: 1.2rem; background: #eff6ff; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.location-item-title { font-size: 0.95rem; font-weight: 600; color: var(--text-main); }

/* --- HARİTA İŞARETÇİLERİ --- */
.user-marker-dot { width: 20px; height: 20px; background: var(--primary); border: 3px solid white; border-radius: 50%; box-shadow: 0 0 12px rgba(37, 99, 235, 0.6); }
.building-marker { font-size: 26px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); cursor: pointer; }

/* --- TOAST --- */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 12000 !important; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: rgba(30, 41, 59, 0.85); backdrop-filter: blur(10px); color: white; padding: 12px 18px; border-radius: 12px; font-size: 0.9rem; animation: fadeIn 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.2); pointer-events: auto; max-width: 300px; }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.error { border-left: 4px solid var(--danger); } 
.toast.success { border-left: 4px solid var(--success); }
@keyframes fadeIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }