/* Country Pages - Public styles */
.cp-card { border:1px solid #eee; border-radius:12px; padding:16px; }
.cp-card__header { display:flex; align-items:center; gap:12px; }
.cp-card__flag { width:40px; height:28px; object-fit:cover; border-radius:4px; }
.cp-card__title { margin:0; font-size:1.25rem; }
.cp-card__meta { list-style:none; padding:0; margin:.5rem 0; display:flex; gap:12px; flex-wrap:wrap; }
.cp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; }
.cp-grid__card { display:block; border:1px solid #eee; border-radius:12px; padding:12px; text-decoration:none; color:inherit; }
.cp-grid__flag { width:100%; height:120px; object-fit:cover; border-radius:8px; }
.cp-grid__title { margin:.5rem 0 0; font-size:1rem; }
.cp-grid__subtitle { margin:.25rem 0 0; color:#666; font-size:.9rem; }
.cp-button { display:inline-block; padding:.5rem .75rem; border-radius:8px; background:#111; color:#fff; text-decoration:none; }

/* BVS Resources - Generic Styles */
.bvs-resources-container {
    margin: 1rem 0;
}

.bvs-resources-header {
    margin-bottom: 1.5rem;
}

.bvs-resources-count {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Grid - Generic for all resources */
.bvs-grid {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.bvs-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (min-width: 1200px) {
    .bvs-grid[data-columns="4"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .bvs-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .bvs-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Item/Card - Generic */
.bvs-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: fit-content;
}

.bvs-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.bvs-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bvs-item-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: 600;
}

.bvs-item-title a {
    color: #2563eb;
    text-decoration: none;
}

.bvs-item-title a:hover {
    text-decoration: underline;
}

.bvs-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bvs-field {
    font-size: 0.9rem;
    line-height: 1.4;
}

.bvs-field-label {
    font-weight: 600;
    color: #374151;
}

.bvs-field-value {
    color: #6b7280;
}

.bvs-item-actions {
    margin-top: auto;
    padding-top: 0.5rem;
}

.bvs-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.bvs-btn:hover {
    background: #1d4ed8;
    color: white;
    text-decoration: none;
}

/* Pagination - Generic */
.bvs-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.bvs-pagination .page-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s ease;
}

.bvs-pagination .page-link:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.bvs-pagination .page-link.current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.bvs-pagination .page-dots {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    color: #666;
}

/* Legacy backwards compatibility */
.bvs-journals-container { margin: 1rem 0; }
.bvs-journals-header { margin-bottom: 1.5rem; }
.bvs-journals-count { font-size: 1.1rem; color: #666; margin: 0; }
.bvs-journals-grid { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.bvs-journal-item { border: 1px solid #e0e0e0; border-radius: 8px; padding: 1.25rem; background: #fff; }
.bvs-journals-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }

/* Filters Sidebar */
.bvs-container-with-filters {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.bvs-filters-sidebar {
    flex: 0 0 20%;
    max-width: 300px;
}

.bvs-content-area {
    flex: 1;
    min-width: 0;
}

.bvs-filters-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.bvs-filters-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 12px;
    border-bottom: 2px solid #0073aa;
}

.bvs-filter-group {
    margin-bottom: 16px;
}

.bvs-filter-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.bvs-filter-input,
.bvs-filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.bvs-filter-input:focus,
.bvs-filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.bvs-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.bvs-btn-filter {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
    box-sizing: border-box;
}

.bvs-btn-primary {
    background: #0073aa;
    color: white;
}

.bvs-btn-primary:hover {
    background: #005a87;
    color: white;
}

.bvs-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.bvs-btn-secondary:hover {
    background: #dee2e6;
    color: #495057;
}

.bvs-checkbox-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    background: white;
}

.bvs-checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.bvs-checkbox-item:hover {
    background-color: #f8f9fa;
}

.bvs-checkbox-item:last-child {
    margin-bottom: 0;
}

.bvs-checkbox {
    margin-right: 8px;
    transform: scale(1.1);
}

.bvs-checkbox-label {
    font-size: 13px;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.bvs-count {
    color: #6c757d;
    font-size: 11px;
    font-weight: normal;
}

.bvs-no-countries {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin: 10px 0;
    font-size: 12px;
}

.bvs-active-filters {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #dee2e6;
    font-size: 12px;
}

.bvs-active-filters strong {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-size: 13px;
}

.bvs-filter-tag {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    margin: 4px 4px 4px 0;
    font-size: 11px;
    font-weight: 500;
}

.bvs-remove-filter {
    color: white;
    text-decoration: none;
    margin-left: 6px;
    font-weight: bold;
    opacity: 0.8;
}

.bvs-remove-filter:hover {
    opacity: 1;
    color: white;
}

.bvs-content-area {
    overflow: hidden;
    width: 100%;
    max-width: none;
}

.bvs-content-area .bvs-grid {
    display: grid !important;
    gap: 20px;
    margin: 20px 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.bvs-content-area .bvs-grid-1 { grid-template-columns: 1fr !important; }
.bvs-content-area .bvs-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.bvs-content-area .bvs-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.bvs-content-area .bvs-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.bvs-content-area .bvs-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.bvs-content-area .bvs-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }

.bvs-content-area .bvs-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.bvs-content-area .bvs-grid > * {
    min-width: 0;
    overflow: hidden;
}

.bvs-journals-container {
    width: 100% !important;
    max-width: none !important;
}

@media (max-width: 992px) {
    .bvs-container-with-filters {
        flex-direction: column;
    }
    
    .bvs-filters-sidebar {
        flex: 0 0 auto;
        max-width: 100%;
    }
    
    .bvs-filters-box {
        position: static;
    }
    
    .bvs-content-area .bvs-grid-2, 
    .bvs-content-area .bvs-grid-3, 
    .bvs-content-area .bvs-grid-4, 
    .bvs-content-area .bvs-grid-5, 
    .bvs-content-area .bvs-grid-6 {
        grid-template-columns: 1fr;
    }
}
