/* Promptor v2 — handoff / engagement katmanı
 * ---------------------------------------------------------------------------
 * Kapsam: Ayarlar → "Handoff & Channels" (handoff) ve "Engagement" sekmeleri.
 * İki sekme de `.promptor-sf` sarmalayıcısını kullanır; genel kart/alan
 * biçimi promptor-v2-settings-forms.css'ten gelir. Burada yalnızca bu
 * sekmelere özgü parçalar (kanal tablosu, saat ızgarası, kural kutusu) var.
 * Renkler paylaşılan --pa6-* token'larından; koyu tema otomatik.
 * ---------------------------------------------------------------------------
 */

/* === 1. Kanal tekrarlayıcı tablosu ====================================== */
body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels {
    width: 100%;
    margin: 4px 0 12px;
    border: 1px solid var(--pa6-card-border);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: var(--pa6-shell-bg);
    box-shadow: none;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels thead th {
    padding: 9px 12px;
    font-size: 11.5px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--pa6-thead-text);
    background: var(--pa6-thead-bg);
    border-bottom: 1px solid var(--pa6-card-border);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels tbody td {
    padding: 8px 12px;
    vertical-align: middle;
    border-bottom: 1px solid var(--pa6-card-border);
    color: var(--pa6-shell-text);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels tbody tr:last-child td {
    border-bottom: 0;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels tbody tr:hover td {
    background: var(--pa6-row-hover);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels .col-enabled { width: 44px; text-align: center; }
body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels .col-type { width: 150px; }
body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels .col-actions { width: 40px; text-align: center; }

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels input[type="text"],
body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels select {
    width: 100%;
    max-width: none;
    margin: 0;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels input[type="checkbox"].promptor-sf-check {
    margin: 0;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-remove-channel {
    color: var(--pa6-shell-muted);
    text-decoration: none;
    line-height: 1;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-remove-channel:hover,
body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-remove-channel:focus {
    color: #dc2626;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels-empty {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: var(--pa6-shell-muted);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf #promptor-handoff-add-channel .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
}

/* === 2. Çalışma saatleri ızgarası ======================================= */
body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 12px 0 16px;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours-row {
    display: grid;
    grid-template-columns: 110px auto 16px auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--pa6-card-border);
    border-radius: 8px;
    background: var(--pa6-shell-bg);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours-row.is-closed {
    opacity: 0.72;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours-row.is-closed input[type="time"] {
    opacity: 0.4;
    pointer-events: none;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours-day {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--pa6-btn2-text);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours-sep {
    text-align: center;
    color: var(--pa6-shell-muted);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours input[type="time"] {
    min-height: 30px;
    padding: 2px 8px;
    border: 1px solid var(--pa6-input-border);
    border-radius: 6px;
    background: var(--pa6-shell-bg);
    color: var(--pa6-shell-text);
    font-size: 12.5px;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours-closed {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--pa6-shell-muted);
}

/* === 3. Satır içi sayı alanı (ardışık cevap sayısı) ===================== */
body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-sf-inline-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--pa6-shell-muted);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-sf-inline-number input[type="number"] {
    width: 64px;
    min-height: 28px;
    padding: 2px 6px;
    border: 1px solid var(--pa6-input-border);
    border-radius: 6px;
    background: var(--pa6-shell-bg);
    color: var(--pa6-shell-text);
}

/* === 4. Engagement: hedefleme kuralları ve post türleri ================== */
body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-engagement-rules {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px dashed var(--pa6-card-border);
    border-radius: 10px;
    background: var(--pa6-thead-bg);
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-engagement-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-engagement-types .promptor-sf-checkrow {
    align-items: center;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf input[type="url"],
body.promptor-v2 .promptor-settings-wrap .promptor-sf input[type="number"] {
    border: 1px solid var(--pa6-input-border);
    border-radius: 8px;
    background: var(--pa6-shell-bg);
    color: var(--pa6-shell-text);
    min-height: 34px;
}

/* === 5. Pro kilidi ====================================================== */
body.promptor-v2 .promptor-settings-wrap .promptor-sf .postbox.promptor-pro-feature .inside {
    opacity: 0.6;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf tr.promptor-pro-feature {
    opacity: 0.6;
}

body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-u-pro-badge {
    display: inline-block;
    margin-left: 8px !important;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    color: #ffffff !important;
    background-image: var(--pa6-grad);
    vertical-align: middle;
}

/* === 6. Duyarlılık ====================================================== */
@media screen and (max-width: 900px) {
    body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels thead {
        display: none;
    }

    body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels tbody tr {
        display: grid;
        grid-template-columns: 44px 1fr 40px;
        gap: 6px 8px;
        padding: 8px 4px;
        border-bottom: 1px solid var(--pa6-card-border);
    }

    body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels tbody td {
        border: 0;
        padding: 2px 4px;
    }

    body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels .col-value,
    body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-channels .col-label {
        grid-column: 2 / 3;
    }

    body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours-row {
        grid-template-columns: 90px auto 12px auto;
    }

    body.promptor-v2 .promptor-settings-wrap .promptor-sf .promptor-handoff-hours-closed {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
