/* Admin Style List Custom CSS */
.country-flag {
    display: inline-block;
    width: 20px;
    height: 15px;
    margin-right: 8px;
    background-size: cover;
    background-position: center;
    vertical-align: middle;
    border: 1px solid #ddd;
    border-radius: 2px;
}

/* Flamuri i Shqipërisë - të dyja variantet */
/* Flamuri i Shqipërisë - version më i detajuar */
.country-al,
.country-alb {
    background-image: url("https://flagcdn.com/al.svg");
    background-size: cover;
    background-position: center;
    background-color: transparent;
}

.country-bih {
    background: linear-gradient(to bottom, #002395 0%, #002395 33%, #fff 33%, #fff 66%, #002395 66%, #002395 100%);
    position: relative;
}

.country-bih:after {
    content: "";
    position: absolute;
    top: 33%;
    left: 0;
    right: 0;
    height: 33%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: 
        linear-gradient(90deg, transparent 35%, #fecb00 35%, #fecb00 65%, transparent 65%),
        linear-gradient(0deg, transparent 35%, #fecb00 35%, #fecb00 65%, transparent 65%);
}

.country-mne {
    background-color: #c40308; /* Red for Montenegro */
    position: relative;
}

.country-mne:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #ffcc00; /* Gold for star */
    border-radius: 50%;
}

.country-nmk {
    background: radial-gradient(circle, #d20000 40%, transparent 41%),
                linear-gradient(to bottom, #ff0000, #ff0000 33%, #ffcc00 33%, #ffcc00 66%, #ff0000 66%, #ff0000);
}

.country-kos {
    background: linear-gradient(to bottom, #244aa5 0%, #244aa5 33%, #fff 33%, #fff 66%, #244aa5 66%, #244aa5 100%);
    position: relative;
}

.country-kos:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #ffcc00;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #244aa5;
}

.country-srb {
    background: linear-gradient(to bottom, #c6363c 0%, #c6363c 33%, #0c4076 33%, #0c4076 66%, #fff 66%, #fff 100%);
}

.keyword-badge {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px 0;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.85em;
    color: #666;
}

/* Table styling */
#result_list {
    width: 100%;
    border-collapse: collapse;
}

#result_list th {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

#result_list td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

#result_list tr:hover {
    background-color: #f5f5f5;
}

/* Pagination styling */
.paginator {
    margin-top: 20px;
    text-align: center;
}

.step-links a {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #007bff;
}

.step-links a:hover {
    background-color: #f8f9fa;
}

.step-links .current {
    margin: 0 10px;
    font-weight: bold;
}

/* Filter dropdown styling */
.dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
}

/* Export button styling */
.btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.dropdown-menu {
    min-width: auto;
}

.dropdown-item {
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
}

/* Bëj kolonën e Actions më të ngushtë */
#result_list th:nth-child(1),
#result_list td:nth-child(1) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

/* Stilizim për filtrat e avancuar */
#advanced-filters {
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

#advanced-filters .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 15px;
}

#advanced-filters .card-body {
    padding: 15px;
}

#advanced-filters .form-label {
    font-weight: 500;
    margin-bottom: 5px;
}

#advanced-filters .form-control,
#advanced-filters .form-select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 6px 12px;
}

#advanced-filters .btn {
    border-radius: 4px;
}

/* Badge për filtrat e aplikuar */
.applied-filters {
    padding: 10px 15px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #17a2b8;
}

.applied-filters .badge {
    font-size: 0.85em;
    padding: 5px 8px;
    margin: 2px;
}

/* Butoni për toggle filters */
#toggle-filters {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Përshtatje responsive */
@media (max-width: 768px) {
    #result_list {
        display: block;
        overflow-x: auto;
    }
    
    #result_list th:nth-child(1),
    #result_list td:nth-child(1) {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }
    
    /* Fshih disa kolona në mobile për hapësirë */
    #result_list th:nth-child(5), /* Abstract */
    #result_list td:nth-child(5),
    #result_list th:nth-child(7), /* Responsible Party */
    #result_list td:nth-child(7),
    #result_list th:nth-child(9), /* Topic Category */
    #result_list td:nth-child(9) {
        display: none;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .row.mb-4 {
        flex-direction: column;
    }
    
    .col-md-6.text-md-end {
        margin-top: 15px;
        text-align: left !important;
    }
    
    .btn-group {
        margin-top: 0.5rem;
    }
    
    #advanced-filters .row > div {
        margin-bottom: 15px;
    }
    
    .applied-filters .badge {
        display: block;
        margin: 5px 0;
        width: 100%;
    }
}

/* Hiqni dyfishimet */
.country-flag {
    display: inline-block;
    width: 20px;
    height: 15px;
    margin-right: 8px;
    background-size: cover;
    background-position: center;
    vertical-align: middle;
    border: 1px solid #ddd;
    border-radius: 2px;
}


.alert-container {
    margin-bottom: 1rem;
}
.alert {
    padding: 1rem;
    border: 1px solid #ccc;
    background-color: #f8d7da;
    color: #721c24;
}
.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}
.btn-close {
    float: right;
    cursor: pointer;
}