﻿/**
 * KDB Popup Duyuru Sistemi - CSS Stilleri
 */

/* Overlay - Arka plan karartma */
.kdb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    pointer-events: none;
}

    .kdb-popup-overlay.show {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.7);
        pointer-events: auto;
    }

/* Modal - Ana popup kutusu */
.kdb-popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

    .kdb-popup-modal.show {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

/* Kapatma butonu */
.kdb-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

    .kdb-popup-close:hover {
        background-color: rgba(0, 0, 0, 0.8);
    }

/* İçerik */
.kdb-popup-content {
    position: relative;
}

/* Tek görsel */
.kdb-popup-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
}

/* Metin alanı */
.kdb-popup-text {
    padding: 20px;
    background-color: #fff;
}

.kdb-popup-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.kdb-popup-description {
    margin: 0;
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* Slider */
.kdb-popup-slider {
    position: relative;
    overflow: hidden;
}

.kdb-popup-slides {
    position: relative;
    width: 100%;
}

.kdb-popup-slide {
    display: none;
    width: 100%;
}

    .kdb-popup-slide.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.kdb-popup-slide-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    margin: 0 auto;
}

/* Slider kontrolleri */
.kdb-popup-slider-prev,
.kdb-popup-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.kdb-popup-slider-prev {
    left: 15px;
}

.kdb-popup-slider-next {
    right: 15px;
}

    .kdb-popup-slider-prev:hover,
    .kdb-popup-slider-next:hover {
        background-color: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

/* Slider dots */
.kdb-popup-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.kdb-popup-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

    .kdb-popup-slider-dot:hover {
        background-color: rgba(255, 255, 255, 0.8);
    }

    .kdb-popup-slider-dot.active {
        background-color: #fff;
        transform: scale(1.2);
    }

/* Popup navigasyonu (birden fazla popup için) */
.kdb-popup-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f5f5f5;
    border-top: 1px solid #eee;
}

.kdb-popup-counter {
    font-size: 0.9rem;
    color: #666;
}

.kdb-popup-next-btn {
    padding: 8px 20px;
    border: none;
    background-color: #007bff;
    color: #fff;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .kdb-popup-next-btn:hover {
        background-color: #0056b3;
    }

/* Responsive */
@media (max-width: 768px) {
    .kdb-popup-modal {
        max-width: 95vw;
        max-height: 95vh;
        border-radius: 8px;
    }

    .kdb-popup-close {
        top: 5px;
        right: 5px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .kdb-popup-image,
    .kdb-popup-slide-image {
        max-height: 60vh;
    }

    .kdb-popup-title {
        font-size: 1.2rem;
    }

    .kdb-popup-description {
        font-size: 0.9rem;
    }

    .kdb-popup-slider-prev,
    .kdb-popup-slider-next {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    .kdb-popup-slider-prev {
        left: 8px;
    }

    .kdb-popup-slider-next {
        right: 8px;
    }

    .kdb-popup-text {
        padding: 15px;
    }

    .kdb-popup-nav {
        padding: 12px 15px;
    }
}

/* Link hover efekti */
.kdb-popup-content a {
    display: block;
    transition: opacity 0.2s ease;
}

    .kdb-popup-content a:hover {
        opacity: 0.9;
    }

/* Erişilebilirlik - Focus stilleri */
.kdb-popup-close:focus,
.kdb-popup-slider-prev:focus,
.kdb-popup-slider-next:focus,
.kdb-popup-next-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.kdb-popup-slider-dot:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
