/* ─── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(11, 35, 71, 0.48);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    overscroll-behavior: contain;
    touch-action: none;
}

html[data-theme="dark"] .modal-overlay {
    background: rgba(2, 6, 23, 0.72);
}

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

.modal-overlay__backdrop {
    position: absolute;
    inset: 0;
}

.modal-panel {
    position: relative;
    width: min(100%, 440px);
    max-height: min(90vh, 760px);
    overflow: auto;
    border-radius: var(--radius-xl);
    /* FIX: 24px hardcode → var(--space-6) token */
    padding: var(--space-6);
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-float);
    transform: translateY(12px) scale(0.990);
    transition: transform var(--transition-normal);
    overscroll-behavior: contain;
    touch-action: auto;
}

html[data-theme="dark"] .modal-panel {
    background: linear-gradient(180deg, rgba(17, 25, 42, 0.98), rgba(17, 25, 42, 0.94));
}

.modal-panel:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px var(--brand-green-ring), var(--shadow-float);
}

.modal-overlay.active .modal-panel {
    transform: translateY(0) scale(1);
}

/* İlan detayı için geniş panel varyantı — içerik feed kartı kadar zengin. */
.modal-panel--detail {
    width: min(100%, 720px);
    max-height: min(92vh, 920px);
    padding: var(--space-5);
}

/* Detay overlay'i feed altında kalsa bile dokunma kaydırması içerikle senkron olsun. */
.job-detail-overlay {
    touch-action: auto;
}

.job-detail-overlay .modal-overlay__backdrop {
    cursor: pointer;
    /* Backdrop tıklanabilir bir anchor; varsayılan link renklerini bastır. */
    color: transparent;
    text-decoration: none;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-soft, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    color: var(--ink, #fff);
    font-size: 22px;
    line-height: 1;
    text-decoration: none;
    transition: background var(--transition-normal), transform var(--transition-normal);
}

.modal-close:hover,
.modal-close:focus-visible {
    background: var(--brand-green-ring, rgba(26, 183, 105, 0.18));
    transform: scale(1.04);
    outline: none;
}

.modal-panel::-webkit-scrollbar { width: 8px; }
.modal-panel::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-pill);
}

.modal-title {
    font-size: 1.1875rem;
    font-weight: 900;
    line-height: 1.18;
    /* Corporate: sıkı tracking heading hiyerarşisi için */
    letter-spacing: -0.03em;
    margin-bottom: var(--space-2);
    color: var(--brand-navy);
}

html[data-theme="dark"] .modal-title {
    color: var(--text);
}

.modal-subtitle {
    margin: 0 0 var(--space-4);
    color: var(--muted);
    font-size: var(--font-sm);
    line-height: 1.6;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .modal-overlay {
        align-items: stretch;
        padding: var(--space-3);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .modal-panel {
        width: 100%;
        max-height: calc(100vh - var(--space-3) * 2);
        border-radius: var(--radius-lg);
        padding: 18px;
    }
}

@media (max-width: 420px) {
    .modal-panel {
        max-height: calc(100vh - var(--space-2) * 2);
        padding: 16px;
        border-radius: var(--radius-md);
    }
}

/* ─── Mobile More Sheet (bottom-nav "Menü") ─────────────────────────────────── */
.more-sheet {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.more-sheet[hidden] { display: none; }

.more-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 35, 71, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

html[data-theme="dark"] .more-sheet__backdrop {
    background: rgba(2, 6, 23, 0.62);
}

.more-sheet__panel {
    position: relative;
    width: min(100%, 560px);
    background: var(--panel);
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    box-shadow: 0 -18px 48px rgba(11, 35, 71, 0.18);
    padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(110%);
    transition: transform 0.26s cubic-bezier(.2,.8,.2,1);
    pointer-events: none;
    max-height: 86vh;
    overflow-y: auto;
}

html[data-theme="dark"] .more-sheet__panel {
    background: var(--panel-2, #0f172a);
    border-top: 1px solid var(--border);
}

.more-sheet.is-open .more-sheet__backdrop {
    opacity: 1;
    pointer-events: auto;
}

.more-sheet.is-open .more-sheet__panel {
    transform: translateY(0);
    pointer-events: auto;
}

.more-sheet__handle {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: var(--border-medium, #d1d5db);
    margin: 6px auto 10px;
}

.more-sheet__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.more-sheet__head-text { flex: 1 1 auto; min-width: 0; }

.more-sheet__title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    margin: 0;
}

.more-sheet__subtitle {
    margin: 4px 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.more-sheet__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-green, #1ab769);
    box-shadow: 0 0 0 3px rgba(26, 183, 105, 0.18);
    animation: more-sheet-live-pulse 1.8s ease-in-out infinite;
}

@keyframes more-sheet-live-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(26, 183, 105, 0.18); }
    50%      { box-shadow: 0 0 0 6px rgba(26, 183, 105, 0.05); }
}

.more-sheet__close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.more-sheet__close svg { width: 16px; height: 16px; fill: currentColor; }

.more-sheet__close:hover {
    background: var(--bg);
    color: var(--text);
}

.more-sheet__section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 6px 0;
}

.more-sheet__action {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.more-sheet__action:hover {
    background: var(--brand-green-muted);
    border-color: rgba(26, 183, 105, 0.32);
}

.more-sheet__action:active {
    transform: scale(0.985);
}

.more-sheet__action-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(26, 183, 105, 0.10);
    color: var(--brand-green-hover);
    display: grid;
    place-items: center;
}

.more-sheet__action-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
}

.more-sheet__action-label { font-weight: 700; }

.more-sheet__action-meta {
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 700;
}

.more-sheet__divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0 10px;
}

.more-sheet__link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 6px;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}

.more-sheet__link:hover {
    color: var(--brand-green-hover);
}

.more-sheet__cta {
    margin-top: 14px;
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-hover));
    color: #fff;
    border: 1px solid rgba(26, 183, 105, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9375rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(26, 183, 105, 0.28);
    transition: transform 0.12s ease, box-shadow 0.18s ease;
}
.more-sheet__cta:hover { box-shadow: 0 12px 28px rgba(26, 183, 105, 0.40); }
.more-sheet__cta:active { transform: scale(0.985); }

/* ─── 2×2 hızlı-eylem grid (Tema / Ara / Paylaş / Başa Dön) ─────────────────── */
.more-sheet__section--grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 4px 0 14px;
}

.more-sheet__tile {
    appearance: none;
    cursor: pointer;
    text-align: left;
    display: grid;
    grid-template-areas:
        "icon meta"
        "label label";
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px 10px;
    padding: 14px;
    min-height: 92px;
    background: var(--bg-soft, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
}

.more-sheet__tile:hover {
    border-color: rgba(26, 183, 105, 0.42);
    background: var(--brand-green-muted, rgba(26, 183, 105, 0.06));
    box-shadow: 0 6px 16px rgba(11, 35, 71, 0.06);
}
.more-sheet__tile:active { transform: scale(0.97); }

.more-sheet__tile:focus-visible {
    outline: 2px solid var(--brand-green, #1ab769);
    outline-offset: 3px;
}

.more-sheet__tile-icon {
    grid-area: icon;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(26, 183, 105, 0.14), rgba(26, 183, 105, 0.06));
    color: var(--brand-green-hover, #128f55);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(26, 183, 105, 0.12);
}
.more-sheet__tile-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }

.more-sheet__tile-label {
    grid-area: label;
    font-weight: 800;
    font-size: 0.9375rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.more-sheet__tile-meta {
    grid-area: meta;
    justify-self: end;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    background: rgba(11, 35, 71, 0.04);
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

html[data-theme="dark"] .more-sheet__tile {
    background: rgba(148, 163, 184, 0.06);
    border-color: rgba(148, 163, 184, 0.14);
}
html[data-theme="dark"] .more-sheet__tile-meta {
    background: rgba(148, 163, 184, 0.10);
    color: var(--muted);
}

/* Aktif-tema göstergesi — aria-pressed=true (light) iken hafif vurgu */
.more-sheet__tile[aria-pressed="true"] {
    background: linear-gradient(135deg, rgba(26, 183, 105, 0.08), rgba(26, 183, 105, 0.02));
    border-color: rgba(26, 183, 105, 0.32);
}

/* Paylaş tile confirm flash (clipboard fallback) */
.more-sheet__tile.is-confirmed::after {
    content: "Kopyalandı ✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--brand-green, #1ab769);
    color: #fff;
    font-weight: 800;
    font-size: 0.875rem;
    border-radius: 16px;
    animation: more-sheet-confirm-flash 1.4s ease-out forwards;
}
@keyframes more-sheet-confirm-flash {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; }
}

/* ─── Hızlı-filtre çipleri (yatay scroll'lu) ────────────────────────────────── */
.more-sheet__section--chips {
    display: flex !important;
    flex-direction: row;
    gap: 8px;
    margin: 4px 0 14px;
    padding: 4px 2px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.more-sheet__section--chips::-webkit-scrollbar { display: none; }

.more-sheet__chip {
    flex: 0 0 auto;
    padding: 9px 16px;
    background: var(--bg-soft, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    scroll-snap-align: start;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.1s ease;
}
.more-sheet__chip:hover {
    background: var(--brand-green-muted, rgba(26, 183, 105, 0.08));
    border-color: rgba(26, 183, 105, 0.32);
    color: var(--brand-green-hover, #128f55);
}
.more-sheet__chip:active { transform: scale(0.97); }
html[data-theme="dark"] .more-sheet__chip {
    background: rgba(148, 163, 184, 0.06);
    border-color: rgba(148, 163, 184, 0.14);
}

.more-sheet__cta svg { width: 18px; height: 18px; fill: currentColor; }

.more-sheet__cta:hover {
    box-shadow: 0 12px 28px rgba(26, 183, 105, 0.38);
}

.more-sheet__cta:active { transform: scale(0.985); }

html[data-theme="dark"] .more-sheet__action {
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .more-sheet__action:hover {
    background: rgba(26, 183, 105, 0.10);
}

body.more-sheet-open {
    overflow: hidden;
}

/* Hide on desktop — only a mobile bottom-nav helper */
@media (min-width: 901px) {
    .more-sheet { display: none !important; }
}
