/**
 * assets/css/announcement-popup.css
 * Özel Döşkaya Koleji - Akıllı Medya (Video & Görsel) Destekli Pop-up Tasarımı
 */

/* ==========================================================================
   1. OVERLAY & BACKDROP
   ========================================================================== */
body.doskaya-popup-open {
    overflow: hidden !important;
    touch-action: none;
}

.doskaya-announcement-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    background: rgba(3, 31, 66, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.doskaya-announcement-overlay.is-active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   2. MODAL KUTUSU
   ========================================================================== */
.doskaya-announcement-modal {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 840px;
    max-height: min(580px, calc(100dvh - 32px));
    box-shadow: 0 25px 60px -15px rgba(3, 31, 66, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    outline: none;
}

.doskaya-announcement-overlay.is-active .doskaya-announcement-modal {
    transform: scale(1) translateY(0);
}

/* ==========================================================================
   3. BAŞLIK ÇUBUĞU (HEADER)
   ========================================================================== */
.doskaya-announcement-top {
    background: linear-gradient(135deg, #031f42 0%, #0b3266 100%);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #ffffff;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.doskaya-announcement-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.doskaya-announcement-brand img {
    height: 28px;
    width: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.doskaya-announcement-title-header {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doskaya-announcement-close-btn {
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.doskaya-announcement-close-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.08);
}

.doskaya-announcement-close-btn:focus-visible {
    outline: 2px solid #ff7e00;
    outline-offset: 2px;
}

/* ==========================================================================
   4. SLAYT KONTEYNERİ & MEDYA / İÇERİK
   ========================================================================== */
.doskaya-slider-container {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    background: #ffffff;
    min-height: 0;
}

.doskaya-slide-item {
    display: none;
    width: 100%;
    grid-template-columns: 1.05fr 1.15fr;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.doskaya-slide-item.active {
    display: grid;
    opacity: 1;
}

/* Salt Metin Slayt (Medya Olmayan Durum) */
.doskaya-slide-item.is-text-only {
    grid-template-columns: 1fr;
}

.doskaya-slide-item.is-text-only .doskaya-slide-content-wrap {
    padding: 32px 36px;
    max-width: 100%;
}

/* Medya Bölümü */
.doskaya-slide-media-wrap {
    position: relative;
    background: #02142d;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid #f1f5f9;
}

.doskaya-slide-media-wrap.is-video {
    background: #000000;
}

.doskaya-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.doskaya-slide-item.active .doskaya-slide-img {
    transform: scale(1.01);
}

/* Native Video Player */
.doskaya-slide-video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000000;
    display: block;
    outline: none;
}

/* Embed Video (YouTube / Vimeo) */
.doskaya-video-embed-responsive {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 260px;
    background: #000000;
}

.doskaya-video-embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Rozet (Badge) */
.doskaya-slide-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(6px);
    z-index: 2;
    pointer-events: none;
}

/* İçerik Bölümü */
.doskaya-slide-content-wrap {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.doskaya-slide-inner-body {
    display: flex;
    flex-direction: column;
}

.doskaya-slide-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.doskaya-slide-date {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.doskaya-slide-text-badge {
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.doskaya-slide-title {
    font-size: 17.5px;
    font-weight: 800;
    color: #031f42;
    margin-bottom: 10px;
    line-height: 1.38;
    letter-spacing: -0.01em;
}

.doskaya-slide-desc {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
    max-height: 170px;
    overflow-y: auto;
    white-space: pre-line;
    padding-right: 4px;
}

.doskaya-slide-desc::-webkit-scrollbar {
    width: 4px;
}
.doskaya-slide-desc::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.doskaya-slide-cta-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.doskaya-popup-cta-btn {
    background: #ff7e00;
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 126, 0, 0.25);
    white-space: nowrap;
}

.doskaya-popup-cta-btn:hover {
    background: #e67100;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 126, 0, 0.35);
}

.doskaya-popup-cta-btn:focus-visible {
    outline: 2px solid #031f42;
    outline-offset: 2px;
}

/* ==========================================================================
   5. ALT ÇUBUK (FOOTER) & GEZİNME
   ========================================================================== */
.doskaya-popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    gap: 12px;
}

.doskaya-slider-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doskaya-nav-arrow {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #031f42;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    touch-action: manipulation;
}

.doskaya-nav-arrow:hover,
.doskaya-nav-arrow:active {
    background: #031f42;
    color: #ffffff;
    border-color: #031f42;
}

.doskaya-nav-arrow:focus-visible {
    outline: 2px solid #ff7e00;
    outline-offset: 2px;
}

.doskaya-page-counter {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    min-width: 42px;
    text-align: center;
    user-select: none;
}

.doskaya-dots-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.doskaya-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.25s ease, background-color 0.25s ease, border-radius 0.25s ease;
}

.doskaya-dot.active {
    width: 22px;
    border-radius: 10px;
    background: #ff7e00;
}

.doskaya-dot:focus-visible {
    outline: 2px solid #031f42;
    outline-offset: 2px;
}

/* ==========================================================================
   6. RESPONSIVE DÜZENLER
   ========================================================================== */
@media (max-width: 768px) {
    .doskaya-announcement-modal {
        max-width: 520px;
        max-height: min(580px, calc(100dvh - 24px));
        border-radius: 16px;
    }

    .doskaya-slide-item {
        grid-template-columns: 1fr;
        display: none;
    }

    .doskaya-slide-item.active {
        display: flex;
        flex-direction: column;
    }

    .doskaya-slide-media-wrap {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        flex-shrink: 0;
    }

    .doskaya-video-embed-responsive {
        min-height: 180px;
    }

    .doskaya-slide-content-wrap {
        padding: 16px 20px;
        flex: 1;
        overflow-y: auto;
    }

    .doskaya-slide-item.is-text-only .doskaya-slide-content-wrap {
        padding: 24px 20px;
    }

    .doskaya-slide-title {
        font-size: 15.5px;
        margin-bottom: 8px;
    }

    .doskaya-slide-desc {
        font-size: 12.5px;
        max-height: 110px;
        margin-bottom: 12px;
    }

    .doskaya-popup-footer {
        padding: 10px 16px;
    }

    .doskaya-popup-cta-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .doskaya-announcement-overlay {
        padding: 8px;
    }

    .doskaya-announcement-modal {
        max-height: calc(100dvh - 16px);
        border-radius: 14px;
    }

    .doskaya-announcement-top {
        padding: 10px 14px;
    }

    .doskaya-announcement-title-header {
        font-size: 12px;
    }

    .doskaya-slide-media-wrap {
        height: 150px;
        min-height: 150px;
        max-height: 150px;
    }

    .doskaya-slide-content-wrap {
        padding: 14px 14px;
    }

    .doskaya-slide-title {
        font-size: 14.5px;
        line-height: 1.35;
    }

    .doskaya-dots-wrap {
        display: none; /* Çok küçük ekranlarda oklar ve sayaç yeterli */
    }

    .doskaya-popup-footer {
        padding: 8px 12px;
        gap: 8px;
    }

    .doskaya-popup-cta-btn {
        font-size: 11.5px;
        padding: 7px 12px;
    }
}
