/* ─── PageHelp — sayfa yardım popup'ı ─────────────────────────── */

/* Sekme barı — kullanıcı/yönetici dokümanı arasında geçiş.
   AdminDocKey atandığında VE kullanıcı main.admin.docs.view yetkili ise görünür. */
.page-help-tabs {
    display: flex;
    gap: 6px;
    margin: -8px -12px 16px;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.page-help-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}

    .page-help-tab:hover {
        background: rgba(0, 121, 107, 0.06);
        color: #00796b;
    }

    .page-help-tab.active {
        background: #ffffff;
        border-color: #e2e8f0;
        border-bottom-color: #ffffff;
        color: #00796b;
        margin-bottom: -1px;
    }

    .page-help-tab.admin .material-symbols-outlined {
        color: #b45309;
    }

    .page-help-tab.admin.active {
        color: #b45309;
        border-color: #fde68a;
    }

    .page-help-tab .material-symbols-outlined {
        font-size: 18px;
    }

/* Sayfa header'ı ile içerik arasına yerleşen yardım barı */
.page-help-bar {
    display: flex;
    justify-content: flex-end;
    margin: 4px 0 8px;
}

/* Header kartının içinde — başlıkla aynı hizada (sağa yaslı) */
.page-help-bar.inline {
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

/* Tetikleyici buton — header'ın sağında belirgin görünmeli (parlak amber renk). */
.page-help-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    border: 1px solid #fcd34d;
    border-radius: 16px;
    color: #1f2937;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
    letter-spacing: 0.2px;
    white-space: nowrap;
    text-decoration: none;
}

.page-help-trigger:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.55);
    transform: translateY(-1px);
}

.page-help-trigger:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.35);
}

.page-help-trigger .material-symbols-outlined {
    font-size: 18px;
    color: #1f2937;
    animation: page-help-pulse 2.4s ease-in-out infinite;
}

@keyframes page-help-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

.page-help-trigger-label {
    letter-spacing: 0.2px;
}

/* B2B popup kalıbı: HeaderCssClass="b2b-popup-header" + body içinde b2b-themed-header HTML elemanı kullanılır.
   DX native header override'ı yok — kalıp Şase Hareketleri popup ile aynı. */
.page-help-popup .dxbl-popup-content {
    padding: 0 !important;
}

/* Body — markdown içerik */
.page-help-body {
    padding: 18px 22px;
    color: #37474f;
    font-size: 14px;
    line-height: 1.55;
    max-height: 60vh;
    overflow-y: auto;
}

.page-help-body h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e2a31;
    margin: 18px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eceff1;
}

.page-help-body h2:first-child {
    margin-top: 0;
}

.page-help-body h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #37474f;
    margin: 14px 0 6px;
}

.page-help-body p {
    margin: 0 0 10px;
}

.page-help-body ul,
.page-help-body ol {
    margin: 0 0 10px;
    padding-left: 22px;
}

.page-help-body ul li,
.page-help-body ol li {
    margin: 2px 0;
}

.page-help-body strong {
    color: #1e2a31;
    font-weight: 600;
}

.page-help-body code {
    background: #eceff1;
    color: #c62828;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

/* Markdown tablosu — butonlar özet tablosu */
.page-help-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 14px;
    font-size: 13px;
}

.page-help-body table th,
.page-help-body table td {
    border: 1px solid #cfd8dc;
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

.page-help-body table thead th {
    background: #eceff1;
    color: #1e2a31;
    font-weight: 600;
}

.page-help-body table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* "Yapma!" blok — blockquote ile */
.page-help-body blockquote {
    background: #fff3e0;
    border-left: 4px solid #ef6c00;
    margin: 10px 0;
    padding: 8px 14px;
    color: #5d4037;
    border-radius: 0 4px 4px 0;
}

.page-help-body blockquote p:last-child {
    margin: 0;
}

.page-help-body img {
    max-width: 100%;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    margin: 8px 0;
}

/* Son güncelleme satırı — body'nin altında küçük bilgi */
.page-help-updated {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px dashed #cfd8dc;
    font-size: 12px;
    color: #78909c;
}

.page-help-updated .material-symbols-outlined {
    font-size: 16px;
    color: #90a4ae;
}

.page-help-updated strong {
    color: #455a64;
    font-weight: 600;
}

.page-help-update-note {
    color: #607d8b;
    font-style: italic;
}

/* Önceki/Sonraki aşama navigasyonu — <button> elementleri */
.page-help-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px 22px;
    background: #f5f7f8;
    border-top: 1px solid #eceff1;
}

.page-help-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-family: inherit;
    text-align: left;
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease, background 120ms ease;
}

.page-help-nav-item.next {
    justify-content: flex-end;
    text-align: right;
}

.page-help-nav-item.clickable {
    cursor: pointer;
}

.page-help-nav-item.clickable:hover {
    border-color: #00796b;
    box-shadow: 0 2px 8px rgba(0, 121, 107, 0.15);
    transform: translateY(-1px);
    background: #f0fdfa;
}

.page-help-nav-item.clickable:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 121, 107, 0.2);
}

.page-help-nav-item.static,
.page-help-nav-item:disabled {
    cursor: default;
    opacity: 0.7;
    background: #fafafa;
}

.page-help-nav-item .material-symbols-outlined {
    font-size: 22px;
    color: #00796b;
    flex-shrink: 0;
}

.page-help-nav-item.static .material-symbols-outlined,
.page-help-nav-item:disabled .material-symbols-outlined {
    color: #90a4ae;
}

.page-help-nav-caption {
    font-size: 11px;
    color: #78909c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-help-nav-label {
    font-size: 14px;
    font-weight: 500;
    color: #1e2a31;
}

.page-help-loading {
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-help-error {
    padding: 30px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #b71c1c;
    font-size: 14px;
}

.page-help-error .material-symbols-outlined {
    font-size: 22px;
}

/* Mobil */
@media (max-width: 768px) {
    .page-help-trigger-label {
        display: none;
    }

    .page-help-trigger {
        padding: 4px 8px;
    }

    .page-help-nav {
        grid-template-columns: 1fr;
    }

    .page-help-nav-item.next {
        justify-content: flex-start;
        text-align: left;
        flex-direction: row-reverse;
    }

    .page-help-body {
        padding: 14px;
        max-height: 70vh;
    }

    /* Mobile popup içeriği — header dışı kısım scroll'lu, taşma olmaz. */
    .page-help-popup .dxbl-popup-content {
        max-height: calc(86vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
