/* Portal yardım modu (B2B ve Operator) — B2BHelp.razor / OperatorHelp.razor + js/portal-help.js.
   İki host'ta ortak; `b2b-help` öneki tarihseldir.
   Üst çubuk teal gradyanının üzerinde beyaz düğme; balonlar açık temada beyaz kart. */

.b2b-help {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.b2b-help__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.b2b-help__btn:hover,
.b2b-help__btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.26);
}

.b2b-help__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.b2b-help__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1060;
    width: 320px;
    max-width: calc(100vw - 16px);
    padding: 6px;
    border: 1px solid #d7e3ee;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(12, 74, 110, 0.22);
}

.b2b-help__menu[hidden] {
    display: none;
}

.b2b-help__item {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: #1f2d3d;
    text-align: start;
    cursor: pointer;
}

a.b2b-help__item,
a.b2b-help__item:hover {
    text-decoration: none;
}

.b2b-help__item:hover,
.b2b-help__item:focus-visible {
    background: #eef6fb;
    outline: none;
}

.b2b-help__item > i {
    width: 18px;
    margin-top: 3px;
    color: #0e7490;
    text-align: center;
}

.b2b-help__item > span {
    color: #1f2d3d;
    text-align: start;
}

/* Renkler açıkça veriliyor: menü teal üst çubuğun içinde durur ve oradaki beyaz yazı
   kuralları (nav span, .nav-link) miras yoluyla başlıkları görünmez yapar. */
.b2b-help__item b {
    display: block;
    color: #1f2d3d;
    font-size: 13px;
    font-weight: 600;
}

.b2b-help__item small {
    display: block;
    color: #6b7c8f;
    font-size: 12px;
    line-height: 1.35;
}

/* İlk giriş kartı: sayfayı kapatmaz, sağ altta durur. */
.b2b-help-welcome {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1055;
    width: 360px;
    max-width: calc(100vw - 32px);
    padding: 18px 18px 14px;
    border: 1px solid #d7e3ee;
    border-radius: 12px;
    background: #fff;
    color: #1f2d3d;
    box-shadow: 0 18px 44px rgba(12, 74, 110, 0.28);
}

.b2b-help-welcome[hidden] {
    display: none;
}

.b2b-help-welcome__close {
    position: absolute;
    top: 6px;
    right: 10px;
    border: 0;
    background: none;
    color: #8696a7;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.b2b-help-welcome__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: #e0f2f7;
    color: #0e7490;
    font-size: 18px;
}

.b2b-help-welcome__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
}

.b2b-help-welcome__body {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.5;
}

.b2b-help-welcome__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.b2b-help-welcome__mute {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    color: #6b7c8f;
    font-size: 12px;
    cursor: pointer;
}

/* İpucu modu şeridi ve işaretleri */
.b2b-help-hintbar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 1055;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100vw - 32px);
    padding: 8px 10px 8px 14px;
    border-radius: 10px;
    background: #0c4a6e;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 10px 28px rgba(12, 74, 110, 0.35);
    transform: translateX(-50%);
}

.b2b-help-hintbar[hidden] {
    display: none;
}

/* İpucu açıklaması açıkken Driver.js perdesi (z-index 10000) ve `.driver-active *` kuralı
   şeridi örtüyordu; "İpucu modunu kapat" her zaman tıklanabilir kalır. */
body.driver-active .b2b-help-hintbar {
    z-index: 10001;
}

body.driver-active .b2b-help-hintbar,
body.driver-active .b2b-help-hintbar * {
    pointer-events: auto;
}

.b2b-help-hint-layer {
    position: fixed;
    inset: 0;
    z-index: 1045;
    pointer-events: none;
}

.b2b-help-hs {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #0e7490;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 0 0 0 rgba(14, 116, 144, 0.6);
    animation: b2b-help-pulse 2s infinite;
}

@keyframes b2b-help-pulse {
    0% { box-shadow: 0 0 0 0 rgba(14, 116, 144, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(14, 116, 144, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 116, 144, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .b2b-help-hs {
        animation: none;
    }
}

/* Tur balonu (Driver.js) */
.driver-popover.b2b-help-pop {
    max-width: 340px;
    border: 1px solid #d7e3ee;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(12, 74, 110, 0.3);
}

.b2b-help-pop .driver-popover-title {
    color: #0c4a6e;
    font-size: 15px;
    font-family: inherit;
}

.b2b-help-pop .driver-popover-description {
    color: #1f2d3d;
    font-size: 13.5px;
    font-family: inherit;
}

.b2b-help-pop .b2b-help-pop__wait {
    display: block;
    margin-top: 8px;
    color: #b45309;
    font-size: 12.5px;
}

.b2b-help-pop .driver-popover-footer button {
    padding: 5px 12px;
    border: 0;
    border-radius: 5px;
    background: #0e7490;
    color: #fff;
    text-shadow: none;
    font-size: 12.5px;
    font-weight: 600;
}

.b2b-help-pop .driver-popover-footer button:hover,
.b2b-help-pop .driver-popover-footer button:focus {
    background: #0c4a6e;
}

.b2b-help-pop .driver-popover-footer .driver-popover-prev-btn {
    background: #e7eef4;
    color: #1f2d3d;
}

/* Bir açılır liste açıkken tur balonu çekilir: balon listenin üstüne düşüp seçeneklere
   tıklamayı engelliyordu (uygulamalı turda ülke seçimi). Seçim yapılıp liste kapanınca geri gelir. */
html:has(.searchable-select[data-open]) .driver-popover {
    opacity: 0;
    pointer-events: none;
}

html:has(.searchable-select[data-open]) .driver-popover * {
    pointer-events: none;
}

/* Uygulamalı tur: kullanıcı vurgunun dışına açılan listelere de tıklayabilsin. */
.b2b-help-practicing body.driver-active * {
    pointer-events: auto;
}

/* Driver.js perdenin <path>'ine satır içi pointer-events:auto yazar (perde tıklaması için);
   !important olmadan perde vurgunun dışına açılan listeyi (ülke/şehir) tıklanamaz bırakıyordu. */
.b2b-help-practicing body.driver-active .driver-overlay,
.b2b-help-practicing body.driver-active .driver-overlay * {
    pointer-events: none !important;
}

@media (max-width: 991.98px) {
    .b2b-help {
        order: -1;
    }

    .b2b-help__label {
        display: none;
    }

    .b2b-help__btn {
        width: 30px;
        padding: 0;
        justify-content: center;
    }

    /* Dar ekranda düğmenin konumundan bağımsız: menü ekran genişliğine yayılır, taşmaz. */
    .b2b-help__menu {
        position: fixed;
        top: 52px;
        left: 8px;
        right: 8px;
        width: auto;
        max-width: none;
    }
}
