/*
 * display:flex kuralları aksi belirtilmedikçe [hidden] özniteliğini geçersiz
 * kılar (ikisi de aynı CSS özgüllüğünde, sonra tanımlanan kazanır) — bu satır
 * olmadan gizlenmesi gereken paneller (kategoriler görünümü, reopen düğmesi
 * vb.) basit görünümle aynı anda görünür kalır.
 */
[hidden] {
    display: none !important;
}

.kvkk-cookie-banner,
.kvkk-cookie-reopen,
.kvkk-embed {
    /* Renkler tek yerden; ayarlardan gelen renkler bu değişkenleri ezer. */
    /* Varsayılan yeşil beyaz yazıyla okunur (kontrast ~5:1); eski #2ecc71 ~2:1 idi. */
    --kvkk-accent: #1e7e34;
    --kvkk-accent-hover: #19672b;
    --kvkk-accent-text: #fff;
    --kvkk-banner-bg: rgba(0, 0, 0, 0.85);
    --kvkk-banner-text: #fff;
}

.kvkk-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--kvkk-banner-bg);
    color: var(--kvkk-banner-text);
    padding: 12px 16px;
    font-size: 14px;
}

.kvkk-cookie-banner__content {
    max-width: 1120px;
    margin: 0 auto;
}

.kvkk-cookie-banner__simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.kvkk-cookie-banner__text {
    flex: 1 1 auto;
}

.kvkk-cookie-banner__actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    align-items: center;
}

.kvkk-cookie-banner__link {
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 4px;
    color: var(--kvkk-banner-text);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
}

.kvkk-cookie-banner__link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.kvkk-cookie-banner__categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kvkk-cookie-category {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.kvkk-cookie-category input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.kvkk-cookie-category input[type="checkbox"]:disabled {
    opacity: 0.6;
}

/*
 * Kabul Et ve Reddet kasıtlı olarak BİREBİR aynı stilde (renk, dolgu, boyut,
 * hover): biri diğerinden "daha az önemli" görünürse (ör. reddet şeffaf ya da
 * linke indirgenmiş) KVK Kurulu Çerez Rehberi'ne göre yönlendirici tasarım
 * ("dark pattern") sayılır ve rızayı geçersiz kılabilir. --accept/--reject
 * değiştiricilerine ayrı görsel kural EKLEMEYİN.
 */
.kvkk-cookie-banner__button {
    background: var(--kvkk-accent);
    color: var(--kvkk-accent-text);
    border: 2px solid var(--kvkk-accent);
    border-radius: 4px;
    padding: 8px 16px;
    min-width: 8em; /* kısa etiketlerde de iki düğme aynı genişlikte */
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.kvkk-cookie-banner__button:hover,
.kvkk-cookie-banner__button:focus-visible {
    background: var(--kvkk-accent-hover);
    border-color: var(--kvkk-accent-hover);
}

@media (max-width: 600px) {
    .kvkk-cookie-banner__actions {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

    .kvkk-cookie-banner__actions .kvkk-cookie-banner__button {
        flex: 1 1 0;
    }

    .kvkk-cookie-banner__actions .kvkk-cookie-banner__link {
        flex: 1 1 100%;
        order: 3;
    }
}

.kvkk-cookie-reopen {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9998;
    /* Bant zemini / bant yazısı renk ayarlarını izler. */
    background: var(--kvkk-banner-bg);
    color: var(--kvkk-banner-text);
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}

.kvkk-cookie-reopen:hover {
    filter: brightness(1.15);
}

.kvkk-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.kvkk-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/*
 * Harita/video yer tutucusu (bkz. includes/class-kvkk-embed-blocker.php).
 * Sarmalayıcı <span>'dır (iframe çoğu zaman <p> içinde durur); blok gibi
 * davranması için display:block. iframe src'siz ama boyutunu korur; yer
 * tutucu onun üstüne serilir.
 */
.kvkk-embed {
    display: block;
    position: relative;
    max-width: 100%;
    /*
     * Birçok tema/sayfa oluşturucu (ThemeREX sc_googlemap, Elementor, Divi)
     * yüksekliği iframe'e değil kapsayıcıya verir ve iframe'i height:100% ile
     * doldurur. Araya giren bu sarmalayıcı yüksekliksiz kalırsa iframe'in
     * %100'ü auto'ya düşer ve harita ~150px görünür. Ebeveynin yüksekliğini
     * devral; ebeveyn auto ise bu da auto'ya eşittir (zararsız).
     */
    height: 100%;
}

/* Onay beklerken yükseklik bilgisi yoksa yer tutucu ezilmesin. iframe'in
   height niteliğinden gelen satır içi min-height bunu ezer. */
.kvkk-embed:not(.kvkk-embed--active) {
    min-height: 300px;
}

.kvkk-embed iframe {
    display: block;
    max-width: 100%;
}

.kvkk-embed__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: #eceff1;
    color: #263238;
    border: 1px solid #cfd8dc;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.kvkk-embed__button {
    background: var(--kvkk-accent);
    color: var(--kvkk-accent-text);
    border: 2px solid var(--kvkk-accent);
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.kvkk-embed__button:hover,
.kvkk-embed__button:focus-visible {
    background: var(--kvkk-accent-hover);
    border-color: var(--kvkk-accent-hover);
}
