/**
 * FaRkLaR.net - Fark Sayfası Layout Stilleri
 * FAZ 2+: Aktif özellikler + Mobile UX İyileştirmeleri
 */

/* ========================================
   Fark Öner Butonu Widget
   ======================================== */
.fark-oner-widget {
    margin-bottom: 30px;
}

#farkOnerBtn {
    position: relative;
    overflow: hidden;
}

#farkOnerBtn:hover {
    background: #2891a8 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 171, 196, 0.3);
}

#farkOnerBtn i {
    margin-right: 8px;
}

/* Disabled durumunda cursor */
#farkOnerBtn.disabled,
#farkOnerBtn[disabled] {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========================================
   Sayfa Altı Filtreler Alanı
   ======================================== */
.fark-filters-area {
    padding-top: 80px;
    padding-bottom: 80px;
    background: #f8f9fa;
}

.fark-filters-area h3 {
    font-size: 28px;
    font-weight: 700;
    color: #31ABC4;
}

.fark-filters-area h4 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #31ABC4;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.fark-filters-area h4 i {
    margin-right: 10px;
    color: #31ABC4;
}

/* ========================================
   Buton Grupları
   ======================================== */
.btn-group-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-group-wrap .btn {
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-group-wrap .btn:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-group-wrap .btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Kategori butonları özel stilleri */
.btn-group-wrap .btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-group-wrap .btn-outline-info:not(.disabled):hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

/* Bağlaç butonları özel stilleri */
.btn-group-wrap .btn-outline-primary {
    border-color: #31ABC4;
    color: #31ABC4;
}

.btn-group-wrap .btn-outline-primary:not(.disabled):hover {
    background-color: #31ABC4;
    border-color: #31ABC4;
    color: #fff;
}

/* ========================================
   Responsive Tasarım
   ======================================== */
@media (max-width: 768px) {
    .fark-filters-area {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .fark-filters-area h3 {
        font-size: 22px;
    }

    .fark-filters-area h4 {
        font-size: 18px;
    }

    .btn-group-wrap .btn {
        font-size: 12px;
        padding: 6px 15px;
    }
}

/* ========================================
   Yükleniyor Animasyonu (FAZ 2 için hazır)
   ======================================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================
   Tooltip Stilleri (FAZ 2 için hazır)
   ======================================== */
.tooltip-placeholder {
    position: relative;
    cursor: help;
}

.tooltip-placeholder::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.tooltip-placeholder:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   FAZ 2+: Filtreleme Modal İyileştirmeleri
   ======================================== */
.card.shadow-sm {
    transition: all 0.3s ease;
}

.card.shadow-sm:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.card .card-title a {
    transition: color 0.2s ease;
}

.card .card-title a:hover {
    color: #2891a8 !important;
}

/* Pagination Stilleri */
.pagination .page-link {
    color: #31ABC4;
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    color: #2891a8;
    background-color: #e9ecef;
}

.pagination .page-item.active .page-link {
    background-color: #31ABC4;
    border-color: #31ABC4;
}

/* ========================================
   Toast Notification Container (FAZ 2+)
   ======================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-header {
    background: linear-gradient(135deg, #31ABC4 0%, #2891a8 100%);
    color: white;
    font-weight: 600;
}

.toast-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ========================================
   Mobile UX İyileştirmeleri (FAZ 2+)
   ======================================== */
@media (max-width: 768px) {
    /* Modal tam ekran mobilde */
    #filtreModal .modal-dialog {
        margin: 0;
        max-width: 100%;
    }

    #filtreModal .modal-content {
        height: 100vh;
        border-radius: 0;
    }

    #filtreModal .modal-body {
        padding: 15px;
    }

    /* Fark Öner Modal tam ekran mobilde */
    #farkOnerModal .modal-dialog {
        margin: 0;
        max-width: 100%;
    }

    #farkOnerModal .modal-content {
        height: 100vh;
        border-radius: 0;
    }

    #farkOnerModal .modal-body {
        padding: 15px;
    }

    /* Card'lar tek sütun mobilde */
    .filtreResults .col-md-6 {
        max-width: 100%;
        flex: 0 0 100%;
    }

    /* Butonlar daha küçük mobilde */
    .btn-group-wrap .btn {
        font-size: 11px;
        padding: 5px 12px;
        border-radius: 15px;
    }

    /* Pagination daha kompakt */
    .pagination {
        font-size: 14px;
    }

    .pagination .page-link {
        padding: 6px 10px;
    }

    /* Toast mobilde tam genişlik */
    .toast-container {
        top: 60px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* Tablet için orta ayarlar */
@media (min-width: 769px) and (max-width: 992px) {
    .btn-group-wrap .btn {
        font-size: 13px;
        padding: 7px 18px;
    }

    #filtreModal .modal-dialog,
    #farkOnerModal .modal-dialog {
        max-width: 90%;
    }
}

/* ========================================
   Erişilebilirlik İyileştirmeleri
   ======================================== */
.btn:focus,
.page-link:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #31ABC4;
    outline-offset: 2px;
}

.btn:focus-visible,
.page-link:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(49, 171, 196, 0.25);
}

/* Loading state animasyonu iyileştirmesi */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}
