/* Map-first community layer. It intentionally has no feed layout: discovery
   happens only from the currently visible map area.

   2026-07 yerleşim: portal enstrüman rayına (#bt-rail-social-slot) mount edilir.
   Görünen tek şey 👥 tetikleyici çipidir; aksiyonlar rayın SOLUNA flyout açılır.
   (Eski hep-açık dikey yığın masaüstünde katman seçicinin üstüne biniyordu.) */
.social-map-control {
    position: relative;
    font-family: Inter, system-ui, sans-serif;
}
/* Ray yoksa (fallback: body'ye mount) eski sabit konum korunur */
.social-map-portal {
    position: fixed;
    z-index: 1800;
    top: calc(env(safe-area-inset-top, 0px) + 74px);
    right: 12px;
}
.social-map-control button {
    border: 0;
    cursor: pointer;
    color: #0f172a;
    background: rgba(255,255,255,.96);
    box-shadow: 0 6px 22px rgba(15,23,42,.16);
    border-radius: 14px;
    font: 700 13px/1 Inter, system-ui, sans-serif;
}
/* Tetikleyici: ray çipi (yalnız ikon; adı title/aria taşır).
   Not: taban ".social-map-control button" (0,0,1,1) kuralını yenmek için
   seçiciler aynı özgüllükte + sonra yazıldı. */
.social-map-control .social-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--bt-ctl, 44px);
    background: transparent;
    box-shadow: none;
    border-radius: 12px;
    font-size: 19px;
}
.social-map-control .social-menu-trigger .smc-label { display: none; }
.social-map-control .social-menu-trigger:hover { background: rgba(2,132,199,.10); }
.social-map-control .social-menu-trigger[aria-expanded="true"] { background: rgba(14,165,233,.12); }
.social-map-control .social-menu-trigger:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: -2px;
}
/* Aksiyonlar: kapalı; yalnız .is-expanded iken rayın soluna flyout kartı */
.social-map-actions {
    display: none;
}
.social-map-control.is-expanded .social-map-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    top: 0;
    right: calc(100% + 14px);
    min-width: 210px;
    padding: 6px;
    background: #fff;
    border: 1px solid rgba(2,32,71,.10);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(2,32,71,.18);
    z-index: 1600;
}
.social-map-actions button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    text-align: left;
    background: transparent;
    box-shadow: none;
    border-radius: 9px;
}
.social-map-actions button:hover { background: #f1f5f9; }
.social-map-toggle {
    min-height: 44px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.smc-icon { flex: 0 0 auto; line-height: 1; }
.smc-label { min-width: 0; }
.social-map-toggle[aria-pressed="true"] { background: #075985; color: #fff; }
.social-map-action { height: 38px; padding: 0 12px; color: #075985 !important; }
.social-map-action:hover { background: #e0f2fe; }
.social-map-hint {
    display: none;
    max-width: 218px;
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(15,23,42,.9);
    color: #fff;
    font: 600 12px/1.35 Inter, system-ui, sans-serif;
    box-shadow: 0 5px 18px rgba(15,23,42,.22);
}
.social-map-hint.is-visible { display: block; }
.social-avatar-marker { background: transparent !important; border: 0 !important; }
.social-avatar-pin {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 3px solid #fff;
    border-radius: 50%;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(140deg,#0ea5e9,#075985);
    box-shadow: 0 3px 13px rgba(2,132,199,.45), 0 0 0 3px rgba(14,165,233,.20);
    font: 800 17px/1 Inter, sans-serif;
}
.social-avatar-pin img { width: 100%; height: 100%; object-fit: cover; }
.social-avatar-pin.social-post-catch::after,
.social-avatar-pin.social-post-photo::after,
.social-avatar-pin.social-post-tip::after {
    position: absolute;
    right: -3px;
    bottom: -3px;
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #f97316;
    content: '🐟';
    font-size: 10px;
}
.social-avatar-pin.social-post-photo::after { background: #8b5cf6; content: '📷'; }
.social-avatar-pin.social-post-tip::after { background: #16a34a; content: '💡'; }
.social-plan-pin { background: #7c3aed; }
.social-plan-pin::after { background: #7c3aed; content: '📅'; }
.social-popup { min-width: 220px; max-width: 285px; color: #172033; font-family: Inter, system-ui, sans-serif; }
.social-popup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.social-popup-avatar { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; background: #e0f2fe; }
.social-popup-name { font-weight: 800; font-size: 13px; color: #0f172a; text-decoration: none; }
.social-popup-time { margin-top: 2px; color: #64748b; font-size: 11px; }
.social-popup-title { margin: 4px 0; font-weight: 800; font-size: 14px; }
.social-popup-copy { margin: 5px 0 8px; color: #475569; font-size: 12px; line-height: 1.45; white-space: pre-line; }
.social-popup-media { display: block; width: 100%; max-height: 160px; margin: 6px 0 8px; border-radius: 10px; object-fit: cover; }
.social-popup-meta { margin: 7px 0; color: #64748b; font-size: 11px; }
.social-popup-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.social-popup-buttons button, .social-popup-buttons a {
    padding: 7px 9px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #075985;
    background: #f0f9ff;
    font: 700 11px/1 Inter, sans-serif;
    text-decoration: none;
    cursor: pointer;
}
.social-modal-backdrop {
    position: fixed;
    z-index: 10020;
    inset: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(2,6,23,.52);
    padding: 12px;
}
.social-modal-backdrop.is-open { display: flex; }
.social-modal {
    width: min(100%, 540px);
    max-height: min(780px, calc(100dvh - 24px));
    overflow: auto;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 72px rgba(2,6,23,.35);
    font-family: Inter, system-ui, sans-serif;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.social-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 14px; border-bottom: 1px solid #e2e8f0; }
.social-modal-kicker { color: #0284c7; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.social-modal-title { margin: 3px 0 0; color: #0f172a; font-size: 19px; line-height: 1.2; }
.social-modal-lead { max-width: 390px; margin: 7px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.social-modal-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: #475569; background: #f1f5f9; font-size: 21px; cursor: pointer; }
.social-form { padding: 18px 20px 20px; }
.social-form label { display: block; margin: 0 0 6px; color: #334155; font-size: 12px; font-weight: 800; }
.social-form input, .social-form select, .social-form textarea {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 14px;
    padding: 10px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #0f172a;
    background: #fff;
    font: 14px/1.35 Inter, sans-serif;
}
.social-form textarea { min-height: 86px; resize: vertical; }
.social-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-location-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; padding: 11px; border: 1px solid #bae6fd; border-radius: 11px; color: #075985; background: #f0f9ff; font-size: 12px; line-height: 1.35; }
.social-location-card button { flex: 0 0 auto; padding: 7px 9px; border: 0; border-radius: 8px; color: #fff; background: #0284c7; font: 800 11px/1 Inter, sans-serif; cursor: pointer; }
.social-form-note { margin: -5px 0 14px; color: #64748b; font-size: 11px; line-height: 1.45; }
.social-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.social-form-status { min-height: 17px; color: #475569; font-size: 12px; }
.social-submit { padding: 11px 14px; border: 0; border-radius: 10px; color: #fff; background: #0284c7; font: 800 13px/1 Inter, sans-serif; cursor: pointer; }
.social-submit:disabled { opacity: .6; cursor: wait; }
.social-groups-list { display: grid; gap: 10px; padding: 18px 20px 20px; }
.social-group-card { padding: 13px; border: 1px solid #dbeafe; border-radius: 12px; background: #f8fcff; }
.social-group-card h3 { margin: 0; color: #0f172a; font-size: 14px; }
.social-group-card p { margin: 6px 0 8px; color: #475569; font-size: 12px; line-height: 1.42; }
.social-group-meta { color: #64748b; font-size: 11px; }
.social-group-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.social-group-actions button { padding: 7px 9px; border: 0; border-radius: 8px; color: #075985; background: #e0f2fe; font: 800 11px/1 Inter,sans-serif; cursor: pointer; }
.social-group-actions button.primary { color: #fff; background: #0284c7; }
.social-hub-summary { display: flex; flex-direction: column; gap: 4px; margin: 16px 20px 0; padding: 13px 14px; border: 1px solid #bae6fd; border-radius: 14px; color: #075985; background: linear-gradient(135deg,#f0f9ff,#ecfeff); }
.social-hub-summary strong { font-size: 13px; line-height: 1.3; }
.social-hub-summary span { color: #475569; font-size: 11px; line-height: 1.45; }
.social-hub-summary.is-empty { border-color: #fed7aa; background: #fff7ed; }
.social-hub-loader { width: 16px; height: 16px; border: 2px solid #bae6fd; border-top-color: #0284c7; border-radius: 50%; animation: social-spin .8s linear infinite; }
@keyframes social-spin { to { transform: rotate(360deg); } }
.social-hub-list { display: grid; gap: 10px; padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
.social-hub-action {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    color: #0f172a;
    background: #f8fcff;
    font-family: Inter, system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}
.social-hub-action:hover { border-color: #7dd3fc; background: #f0f9ff; }
.social-hub-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #075985; background: #e0f2fe; font-size: 19px; }
.social-hub-action strong { display: block; margin-bottom: 3px; font-size: 14px; }
.social-hub-action small { display: block; color: #64748b; font-size: 11px; line-height: 1.35; }
.social-hub-arrow { color: #0284c7; font-size: 24px; font-weight: 400; }
.social-hub-primary { border-color: #7dd3fc; background: linear-gradient(135deg, #f0f9ff, #ecfeff); }
.social-picker-bar {
    position: fixed;
    z-index: 10010;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    display: none;
    width: min(calc(100% - 30px), 380px);
    padding: 12px 14px;
    transform: translateX(-50%);
    border-radius: 14px;
    color: #fff;
    background: rgba(7,89,133,.96);
    box-shadow: 0 10px 30px rgba(2,6,23,.28);
    font: 700 13px/1.35 Inter, sans-serif;
    text-align: center;
}
.social-picker-bar.is-visible { display: block; }
@media (max-width: 768px) {
    /* Mobile has no floating social control at all. Community is deliberately
       inside the existing “Daha Fazla” sheet, so no map control can be covered. */
    .social-map-portal { display: none !important; }
    .social-modal-backdrop { align-items: flex-end; padding: 0; }
    .social-modal { max-height: calc(100dvh - 12px); border-radius: 20px 20px 0 0; }
    .social-form { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
    .social-form-grid { grid-template-columns: 1fr; gap: 0; }
}
