/* EKRS - Responsive Kütüphane CSS - İzole Yapı */

/* Container - Mobile First Yaklaşım */
body .ekrs-container,
.ekrs-container.ekrs-container {
    font-family: "Montserrat", sans-serif !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100vh;
    background: #f8f9fa;
    padding: 15px !important;
    margin: 0 !important;
    margin-left: calc(-50vw + 50%) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    position: relative !important;
}

/* Desktop için container genişliği */
@media (min-width: 1024px) {
    body .ekrs-container,
    .ekrs-container.ekrs-container {
        width: 100% !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        margin-left: auto !important;
        padding: 0 !important;
    }
}

/* Tablet için */
@media (min-width: 768px) and (max-width: 1023px) {
    body .ekrs-container,
    .ekrs-container.ekrs-container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        padding: 15px !important;
    }
}

/* Header */
.ekrs-header {
    background: linear-gradient(135deg, var(--selcuk-blue) 0%, var(--selcuk-blue-hover) 100%);
    color: white;
    padding: 20px 15px;
    border-radius: 8px;
    margin: 0 0 15px 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .ekrs-header {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
}

.ekrs-main-title {
    font-size: 20px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

@media (min-width: 768px) {
    .ekrs-main-title {
        font-size: 24px;
    }
}

.ekrs-subtitle {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .ekrs-subtitle {
        font-size: 14px;
    }
}

/* Arama */
.ekrs-search-container {
    margin-top: 15px;
}

@media (min-width: 768px) {
    .ekrs-search-container {
        margin-top: 20px;
    }
}

.ekrs-search-box {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.ekrs-search-input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    background: white;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .ekrs-search-input {
        padding: 12px 45px 12px 15px;
    }
}

.ekrs-search-input:focus {
    border-color: var(--selcuk-blue);
    box-shadow: 0 0 0 3px rgba(28, 69, 139, 0.1);
}

.ekrs-clear-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--selcuk-blue);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: none;
}

@media (min-width: 768px) {
    .ekrs-clear-btn {
        right: 8px;
        top: 8px;
        width: 32px;
        height: 32px;
    }
}

.ekrs-clear-btn:hover {
    background: var(--selcuk-blue-hover);
}

/* Kontroller */
.ekrs-controls {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 0 0 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .ekrs-controls {
        padding: 20px;
        margin-bottom: 20px;
    }
}

.ekrs-filter-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.ekrs-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

@media (min-width: 768px) {
    .ekrs-filter-buttons {
        gap: 8px;
        justify-content: flex-start;
    }
}

.ekrs-filter-btn {
    padding: 8px 10px;
    border: 2px solid #ddd;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    min-width: 36px;
    min-height: 36px;
    text-align: center;
    transition: all 0.2s;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .ekrs-filter-btn {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 40px;
    }
}

.ekrs-filter-btn:hover {
    border-color: var(--selcuk-blue);
    color: var(--selcuk-blue);
}

.ekrs-filter-btn.ekrs-active {
    background: var(--selcuk-blue);
    color: white;
    border-color: var(--selcuk-blue);
}

.ekrs-stats-tools {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

@media (min-width: 768px) {
    .ekrs-stats-tools {
        flex-direction: row;
        text-align: left;
    }
}

.ekrs-result-count {
    color: #666;
    font-size: 14px;
}

.ekrs-refresh-btn {
    padding: 6px 12px;
    border: 1px solid var(--selcuk-blue);
    background: white;
    color: var(--selcuk-blue);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

    .ekrs-refresh-btn:hover {
        background: var(--selcuk-blue);
        color: white;
    }

/* Sayfalama */
.ekrs-pagination-container {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .ekrs-pagination-container {
        padding: 15px 20px;
        flex-direction: row;
        gap: 10px;
    }
}

.ekrs-page-info {
    font-size: 14px;
    color: #666;
}

.ekrs-pagination {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.ekrs-page-btn {
    padding: 6px 8px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    min-width: 28px;
    text-align: center;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .ekrs-page-btn {
        padding: 6px 10px;
        min-width: 32px;
    }
}

.ekrs-page-btn:hover:not(:disabled) {
    border-color: var(--selcuk-blue);
    color: var(--selcuk-blue);
}

.ekrs-page-btn.ekrs-active {
    background: var(--selcuk-blue);
    color: white;
    border-color: var(--selcuk-blue);
}

.ekrs-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tablo */
.ekrs-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

.ekrs-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

@media (max-width: 767px) {
    .ekrs-table {
        min-width: 500px;
    }
}

.ekrs-th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
}

@media (min-width: 768px) {
    .ekrs-th {
        padding: 15px 12px;
        font-size: 14px;
    }
}

.ekrs-td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    font-size: 13px;
}

@media (min-width: 768px) {
    .ekrs-td {
        padding: 12px;
        font-size: 14px;
    }
}

.ekrs-row:hover {
    background: #f8f9fa;
}

.ekrs-resource-link {
    color: var(--selcuk-blue);
    text-decoration: none;
    font-weight: 500;
}

    .ekrs-resource-link:hover {
        text-decoration: underline;
    }

.ekrs-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ekrs-badge-fulltext {
    background: #d4edda;
    color: #155724;
}

.ekrs-badge-biblio {
    background: #fff3cd;
    color: #856404;
}

.ekrs-badge-other {
    background: #e2e3f3;
    color: #383d9d;
}

.ekrs-description {
    color: #666;
    line-height: 1.4;
}

/* Sonuç bulunamadı */
.ekrs-no-results {
    text-align: center;
    padding: 30px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .ekrs-no-results {
        padding: 40px 20px;
    }
}

.ekrs-no-results h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.ekrs-no-results p {
    margin: 0 0 20px 0;
    color: #666;
}

.ekrs-clear-all-btn {
    padding: 10px 20px;
    background: var(--selcuk-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

    .ekrs-clear-all-btn:hover {
        background: var(--selcuk-blue-hover);
    }

/* Loading */
.ekrs-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ekrs-loading-content {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ekrs-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--selcuk-blue);
    border-radius: 50%;
    animation: ekrs-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes ekrs-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error */
.ekrs-error-state {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.ekrs-retry-btn {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

/* Gizli elementler */
.ekrs-hidden {
    display: none;
}

/* Animasyonlar - sadece EKRS elementleri için */
.ekrs-row {
    transition: background-color 0.2s;
}

.ekrs-filter-btn,
.ekrs-page-btn {
    transition: all 0.2s;
}
