﻿/* Genel container düzenlemeleri */
.search-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

/* Ana filtre satırı - 2 satırlı layout */
.main-filter-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

/* Üst satır - filtreler - KAYMAYI ÖNLER AMA BOYUTLARI DEĞİŞTİRMEZ */
.top-filters {
    display: flex;
    flex-wrap: nowrap; /* Alt satıra kayma yok */
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0; /* Flex container için gerekli */
}

/* Alt satır - kontroller - güncellendi */
.bottom-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: flex-end; /* Sağa hizalama */
}

/* Arama kutusu - büyük boyut */
.search-input-compact {
    position: relative;
    min-width: 200px;
    flex-shrink: 0; /* Küçülmesini önler */
}

.search-box {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

    .search-box:focus {
        outline: none;
        border-color: #007bff;
        background: white;
        box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    }

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
}

/* Büyük filtreler (Ana Kategori, Alt Kategori) */
.filter-select {
    min-width: 180px;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Küçülmesini önler - sadece bu yeterli */
}

    /* Küçük filtreler (Yıl, Sıralama) */
    .filter-select.compact {
        min-width: 120px;
        flex-shrink: 0; /* Küçük filtreler de küçülmesin */
    }

    .filter-select:focus {
        outline: none;
        border-color: #007bff;
        background: white;
        box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    }

    /* Select option'lar için de düzeltme */
    .filter-select option {
        white-space: normal; /* Option'larda normal wrap */
        padding: 5px;
    }

/* View mode icons - güncellendi */
.viewmode-wrapper {
    display: flex;
    gap: 3px;
    background: #f8f9fa;
    padding: 3px;
    border-radius: 20px;
    border: 2px solid #e9ecef;
    order: 1; /* İlk sırada */
    flex-shrink: 0;
}

.viewmode-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .viewmode-icon:hover {
        background-color: #dee2e6;
        color: #007bff;
    }

    .viewmode-icon.active {
        background-color: #007bff;
        color: white;
        box-shadow: 0 2px 8px rgba(0,123,255,0.3);
    }

/* Action buttons - güncellendi */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    order: 2; /* İkinci sırada */
    flex-shrink: 0;
}

.action-btn {
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Excel buton hover efektini düzeltildi */
.btn-excel {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

    .btn-excel:hover {
        background: #28a745; /* Aynı yeşil renk - mavi olmasın */
        border-color: #28a745; /* Aynı yeşil border */
        color: white; /* Beyaz yazı kalır */
        transform: translateY(-2px); /* Hafif yukarı hareket */
        box-shadow: 0 4px 12px rgba(40,167,69,0.3); /* Gölge efekti */
    }

.btn-reset {
    background: transparent;
    color: #6c757d;
    border-color: #6c757d;
}

    .btn-reset:hover {
        background: #6c757d;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(108,117,125,0.3);
    }

/* Responsive design - güncellendi */
@@media (max-width: 992px) {
    .top-filters {
        justify-content: flex-start;
        /* Mobilde de flex-wrap: nowrap kalır */
    }

    .bottom-controls {
        justify-content: center; /* Mobilde ortala */
        gap: 20px;
    }

    .viewmode-wrapper {
        order: 0; /* Mobilde sırası değişmesin */
    }

    .action-buttons {
        order: 0; /* Mobilde sırası değişmesin */
    }
}

@@media (max-width: 768px) {
    .search-container {
        padding: 15px;
    }
    /* Mobilde filtreler alt alta geçebilir */
    .top-filters {
        flex-direction: column;
        flex-wrap: wrap; /* Sadece mobilde wrap */
        gap: 12px;
        align-items: stretch;
    }

    .bottom-controls {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .search-input-compact {
        min-width: 100%;
    }

    .filter-select {
        min-width: 100%;
    }

        .filter-select.compact {
            min-width: 100%;
        }

    .action-buttons {
        width: 100%;
        justify-content: center;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
    }

    .viewmode-wrapper {
        order: 0;
    }
}

/* Searchable dropdown CSS'leri */
.select-search-wrapper {
    position: relative;
}

.select-search-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    z-index: 10;
    display: none;
    font-size: inherit;
}

    .select-search-input:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
    }

.select-search-wrapper.searching .select-search-input {
    display: block;
}

.select-search-wrapper.searching select {
    opacity: 0;
}

.select-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.select-search-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

    .select-search-item:hover {
        background-color: #f8f9fa;
    }

    .select-search-item.selected {
        background-color: #007bff;
        color: white;
    }

.no-results {
    padding: 10px 12px;
    color: #6c757d;
    font-style: italic;
}

/* Content wrapper */
.content-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Training cards enhancements */
.training-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

    .training-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

/* Table enhancements */
.table {
    border-radius: 12px;
    overflow: hidden;
}

    .table thead th {
        background: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
        font-weight: 600;
        color: #495057;
    }

/* Pagination enhancements */
.pagination-wrapper {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
    transition: all 0.2s ease;
}

    .page-link:hover {
        background-color: #e9ecef;
        transform: translateY(-1px);
    }

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.training-category {
    font-size: 0.675rem;
    color: #6b7280; 
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.training-subCategory {
    font-size: 0.475rem;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
