/* ============================================================
   Rehberli Gezinti (product tour / walkthrough)
   Kaydedici (recorder) + Oynatici (player) arayuzu.
   Dependency yok; yuksek z-index ile app UI'in ustunde durur.
   ============================================================ */

:root {
    --gpg-primary: #0d6efd;
}

/* z-index katmanlari: her sey app'in ustunde */
.gpg-toolbar,
.gpg-launcher,
.gpg-select-overlay,
.gpg-form,
.gpg-spot,
.gpg-tip,
.gpg-toast {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------- Kaydedici araç çubuğu ---------- */
.gpg-toolbar {
    position: fixed;
    bottom: 16px;               /* alt-orta: sayfa basligindaki buton kumeleriyle cakismaz */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147482000;
    max-width: calc(100vw - 24px);
    flex-wrap: wrap;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #1f2937;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
    font-size: 13px;
}
.gpg-toolbar .gpg-brand {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 6px;
    border-right: 1px solid rgba(255, 255, 255, .2);
    white-space: nowrap;
}
.gpg-toolbar .gpg-count {
    opacity: .8;
    font-size: 12px;
    white-space: nowrap;
}
.gpg-btn {
    border: 0;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    line-height: 1;
}
.gpg-btn-primary { background: #2563eb; color: #fff; }
.gpg-btn-primary:hover { background: #1d4ed8; }
.gpg-btn-success { background: #16a34a; color: #fff; }
.gpg-btn-success:hover { background: #15803d; }
.gpg-btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; }
.gpg-btn-ghost:hover { background: rgba(255, 255, 255, .22); }
.gpg-btn-danger { background: #dc2626; color: #fff; }
.gpg-btn-danger:hover { background: #b91c1c; }
.gpg-btn-light { background: #fff; color: #1f2937; border: 1px solid #d1d5db; }
.gpg-btn-light:hover { background: #f3f4f6; }
.gpg-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Header modu (admin ust cubuk, ortalanmis) ---------- */
.navbar > .container-fluid { position: relative; }
.gpg-header-host {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: rgba(31, 41, 55, .95);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
    color: #fff;
    font-size: 13px;
    max-width: calc(100vw - 380px);
    flex-wrap: wrap;
    justify-content: center;
}
.gpg-header-host .gpg-brand {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 6px;
    border-right: 1px solid rgba(255, 255, 255, .2);
    white-space: nowrap;
}
.gpg-header-host .gpg-count {
    opacity: .8;
    font-size: 12px;
    white-space: nowrap;
}
.gpg-header-close {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.gpg-header-close:hover { background: rgba(255, 255, 255, .28); }
@media (max-width: 991px) {
    .gpg-header-host {
        position: static;
        transform: none;
        max-width: 100%;
        margin: 6px auto;
    }
}

/* App sayfasi header'i icin de ortalama referansi */
.app-header { position: relative; }
/* App sayfasi onboarding ikonu (basliktan sonra) */
.gpg-guide-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 8px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .18);
    color: var(--app-header-text, #fff);
    cursor: pointer;
    font-size: 15px;
    vertical-align: middle;
    flex: 0 0 auto;
}
.gpg-guide-icon:hover { background: rgba(255, 255, 255, .3); }

/* ---------- Izleyici baslatma dugmesi ---------- */
.gpg-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2147481000;
    background: var(--gpg-primary);
    color: #fff;
    border: 0;
    border-radius: 28px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(13, 110, 253, .45);
}
.gpg-launcher:hover { filter: brightness(1.05); }

/* ---------- Alan secim katmani (Lightshot tarzi) ---------- */
.gpg-select-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    cursor: crosshair;
    background: rgba(17, 24, 39, .35);
}
.gpg-select-hint {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 2147483001;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}
.gpg-select-rect {
    position: absolute;
    border: 2px dashed #38bdf8;
    background: rgba(56, 189, 248, .12);
    pointer-events: none;
}

/* ---------- Adim metni formu ---------- */
.gpg-form {
    position: fixed;
    z-index: 2147483002;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #fff;
    color: #1f2937;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    padding: 14px;
    border: 1px solid #e5e7eb;
}
.gpg-form h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}
.gpg-form textarea {
    width: 100%;
    min-height: 70px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    font-family: inherit;
}
.gpg-form textarea:focus { outline: 2px solid var(--gpg-primary); border-color: transparent; }
.gpg-form .gpg-modes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0;
}
.gpg-form .gpg-modes label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    cursor: pointer;
    color: #374151;
}
.gpg-form .gpg-modes small { color: #6b7280; display: block; }
.gpg-form .gpg-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

/* ---------- Chooser: tur secim satiri ---------- */
.gpg-choose-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    align-items: stretch;
}
.gpg-choose-main {
    flex: 1;
    min-width: 0;
    justify-content: space-between !important;
    text-align: left;
}
.gpg-choose-main .gpg-choose-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gpg-choose-main .gpg-choose-steps {
    color: #6b7280;
    font-weight: 400;
    font-size: 11.5px;
    margin-left: 8px;
    flex-shrink: 0;
}
.gpg-icon-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
}
.gpg-icon-btn:hover { background: #f3f4f6; color: #374151; }
.gpg-icon-btn.gpg-danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.gpg-icon-btn svg { width: 15px; height: 15px; display: block; }

/* ---------- Oynatici: spot (vurgu kutusu) + balon ---------- */
.gpg-backdrop {
    position: absolute;
    inset: 0;
    z-index: 2147481500;
    pointer-events: none; /* gercek tiklamalar hedefe gecsin */
}
/* Etkileşim kilidi: hedef dışındaki tıklamaları engelleyen paneller.
   Bilgi adiminda tek tam panel; tiklama adiminda hedefin etrafinda 4 panel
   (delik = hedef alani, sadece orasi tiklanabilir). */
.gpg-block-wrap {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2147481550;
    pointer-events: none;
}
.gpg-block-panel {
    position: absolute;
    background: transparent;
    pointer-events: auto;
    cursor: not-allowed;
}
.gpg-spot {
    position: absolute;
    z-index: 2147481600;
    border: 3px solid #f59e0b;
    border-radius: 6px;
    box-shadow: 0 0 0 100000px rgba(17, 24, 39, .55), 0 0 18px rgba(245, 158, 11, .8);
    pointer-events: none;
    transition: all .15s ease;
}
/* Kilitli alana tiklaninca hedefe dikkat cek */
.gpg-spot.gpg-pulse {
    border-color: #ef4444;
    box-shadow: 0 0 0 100000px rgba(17, 24, 39, .62), 0 0 26px rgba(239, 68, 68, .95);
}
.gpg-tip {
    position: absolute;
    z-index: 2147481700;
    width: 300px;
    max-width: calc(100vw - 24px);
    background: #fff;
    color: #1f2937;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
    padding: 14px;
    pointer-events: auto;
}
.gpg-tip .gpg-tip-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 10px;
    white-space: pre-wrap;
    word-break: break-word;
}
.gpg-tip .gpg-tip-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.gpg-tip .gpg-tip-progress { font-size: 12px; color: #6b7280; }
.gpg-tip .gpg-tip-click-hint {
    font-size: 12.5px;
    color: #b45309;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gpg-tip-actions { display: flex; gap: 6px; }

/* ---------- Toast ---------- */
.gpg-toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483100;
    background: #111827;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
    opacity: 0;
    transition: opacity .2s ease;
}
.gpg-toast.gpg-show { opacity: 1; }
.gpg-toast.gpg-error { background: #b91c1c; }
