/*
 * Duyuru şeridi, açılır pencere (popup) ve bülten formu.
 *
 * Şerit sayfanın en üstünde SABİT durur. Sayfa `padding-top: --site-bar-h`
 * ile kayar (absolute header bu boşluğun içinde kalır). Sticky header
 * `position: fixed` olduğu için aynı değişkeni `top` olarak kullanır.
 * Yüksekliği JS ölçer. Şerit her genişlikte tek satırdır; uzun metin
 * kısaltılır, buton ve kapatma aynı satırda kalır.
 */

:root {
    --site-bar-h: 0px;
}

/* ============================================================ DUYURU ŞERİDİ */

.site-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    color: #fff;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.site-bar[hidden] {
    display: none;
}

.site-bar.is-open {
    transform: translateY(0);
}

/* Renk tonları: panelden seçilen "tone" değerine karşılık gelir. */
.site-bar--primary { background: linear-gradient(90deg, #155fff 0%, #4d86ff 100%); }
.site-bar--warning { background: linear-gradient(90deg, #b4460b 0%, #e2690f 100%); }
.site-bar--dark    { background: linear-gradient(90deg, #0b1220 0%, #1f2a44 100%); }
.site-bar--success { background: linear-gradient(90deg, #067647 0%, #10a25f 100%); }

.site-bar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 14px;
    padding: 11px 44px 11px 16px;
    text-align: center;
    font-size: 14px;
    line-height: 1.3;
    position: relative;
}

.site-bar__message {
    margin: 0;
    font-weight: 500;
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    padding: 5px 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: background 0.2s ease, transform 0.2s ease;
}

.site-bar__link:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
    transform: translateY(-1px);
}

.site-bar__close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    opacity: 0.75;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.site-bar__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.18);
}

/* Şerit açıkken sayfa aşağı kayar. Absolute header zaten bu padding'in
   içinde durur; sabit (sticky) header viewport'a yapıştığı için top
   kaymasını header.css `--site-bar-h` ile alır. İkisini birden kaydırma. */
html.has-site-bar body {
    padding-top: var(--site-bar-h);
}

/* ========================================================= AÇILIR PENCERE */

.site-popup {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.site-popup[hidden] {
    display: none;
}

.site-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 14, 28, 0.62);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.site-popup.is-open .site-popup__backdrop {
    opacity: 1;
}

.site-popup__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(9, 14, 28, 0.35);
    opacity: 0;
    transform: translateY(18px) scale(0.94);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-popup.is-open .site-popup__card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Görsel kartın üst köşelerine oturur, ayrı bir blok gibi durmaz. */
.site-popup__image {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 18px 18px 0 0;
}

.site-popup__content {
    padding: 26px 26px 24px;
}

.site-popup__card--with-image .site-popup__content {
    padding-top: 22px;
}

.site-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    appearance: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    font-size: 22px;
    line-height: 32px;
    text-align: center;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(9, 14, 28, 0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}

.site-popup__close:hover {
    background: #fff;
    transform: rotate(90deg);
}

.site-popup__heading {
    margin: 0 0 10px;
    font-size: 23px;
    line-height: 1.3;
    font-weight: 700;
    color: #0b1220;
}

.site-popup__body {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.65;
    color: #55607a;
}

/* Tek başına duran çağrı butonu tam genişlik: kartta ortalanmış görünür. */
.site-popup__cta {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
}

.site-popup__cta + .site-subscribe {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eef1f6;
}

/* ============================================================ BÜLTEN FORMU */

.site-subscribe__alert {
    margin: 0 0 12px;
    padding: 10px 13px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.site-subscribe__alert[hidden] { display: none; }
.site-subscribe__alert.is-success { background: #ecfdf3; color: #067647; }
.site-subscribe__alert.is-error { background: #fef3f2; color: #b42318; }

/*
 * Girdi ve buton tek bir hap (pill) içinde birleşik durur — ayrı ayrı
 * duran kutu + buton ikilisi dar kartlarda dağınık görünüyordu.
 */
.site-subscribe__row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e1e6ef;
    border-radius: 100px;
    padding: 4px 4px 4px 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-subscribe__row:focus-within {
    border-color: #155fff;
    box-shadow: 0 0 0 3px rgba(21, 95, 255, 0.12);
}

.site-subscribe__row input[type="email"] {
    flex: 1;
    min-width: 0;
    height: 42px;
    border: 0;
    background: transparent;
    padding: 0 12px;
    font-size: 14px;
    color: #0b1220;
    outline: 0;
}

.site-subscribe__row input[type="email"]::placeholder {
    color: #98a2b3;
}

.site-subscribe__row button,
.site-subscribe__row .default-btn {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 22px;
    border-radius: 100px;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1;
}

/* theme-btn3 tema dosyasında ok ikonu/animasyon taşıyor; burada sadeleşir. */
.site-subscribe__row .theme-btn3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.site-subscribe__row button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.site-subscribe__privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.55;
    color: #6b7280;
    margin: 0 0 4px;
    cursor: pointer;
}

.site-subscribe__privacy input {
    margin-top: 2px;
    flex: 0 0 auto;
}

.site-subscribe__error {
    display: block;
    font-size: 12px;
    color: #dc3545;
    margin-bottom: 8px;
}

.site-subscribe__error[hidden] { display: none; }

.hp-field {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

/* Açık zeminli footer (area14 vb.) — varsayılan açık form stilleri geçerli kalır. */
.vl-footer-area14 .site-subscribe__privacy,
.vl-footer-area12 .site-subscribe__privacy,
.vl-footer-area13 .site-subscribe__privacy {
    color: #5c5c66;
}

.vl-footer-area14 .site-subscribe__privacy a,
.vl-footer-area12 .site-subscribe__privacy a,
.vl-footer-area13 .site-subscribe__privacy a {
    color: var(--vtc-text-title3, #05051C);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Koyu zeminli footer alanları */
.vl-footer-area6 .site-subscribe__row,
.vl-footer-area11 .site-subscribe__row {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.vl-footer-area6 .site-subscribe__row input[type="email"],
.vl-footer-area11 .site-subscribe__row input[type="email"] {
    color: #fff;
}

.vl-footer-area6 .site-subscribe__row input[type="email"]::placeholder,
.vl-footer-area11 .site-subscribe__row input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.vl-footer-area6 .site-subscribe__privacy,
.vl-footer-area11 .site-subscribe__privacy {
    color: rgba(255, 255, 255, 0.7);
}

.vl-footer-area6 .site-subscribe__privacy a,
.vl-footer-area11 .site-subscribe__privacy a {
    color: #fff;
}

/* ==================================================================== MOBİL */

@media (max-width: 575px) {
    .site-bar__inner {
        justify-content: flex-start;
        gap: 8px;
        font-size: 12px;
        padding: 8px 36px 8px 12px;
    }

    .site-bar__message {
        flex: 1 1 auto;
    }

    .site-bar__link {
        flex: none;
        font-size: 12px;
        padding: 4px 10px;
    }

    .site-popup__card {
        max-width: 100%;
        border-radius: 16px;
    }

    .site-popup__image {
        height: 150px;
        border-radius: 16px 16px 0 0;
    }

    .site-popup__content {
        padding: 22px 20px 20px;
    }

    .site-popup__heading {
        font-size: 20px;
    }

    /* Dar ekranda hap düzeni sıkışıyor; alt alta ama yuvarlak kalıyor. */
    .site-subscribe__row {
        flex-direction: column;
        gap: 8px;
        border-radius: 14px;
        padding: 8px;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    .site-subscribe__row input[type="email"] {
        width: 100%;
        border: 1px solid #e1e6ef;
        border-radius: 100px;
        background: #fff;
        padding: 0 16px;
        color: #0b1220;
    }

    .site-subscribe__row button,
    .site-subscribe__row .default-btn {
        width: 100%;
    }

    .vl-footer-area6 .site-subscribe__row input[type="email"],
    .vl-footer-area11 .site-subscribe__row input[type="email"] {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
    }
}

/* Hareketi azaltma tercihine saygı. */
@media (prefers-reduced-motion: reduce) {
    .site-bar,
    .site-popup__backdrop,
    .site-popup__card {
        transition: none;
    }
}
