/* Admin Style Detail CSS - Consistent Django Admin Styling */

/* ===== BUTTON STYLES ===== */
/* Butoni back - Django admin style - I NJËJTË SI NË LISTË */
.btn-back-to-list {
    background-color: #417690; /* Ngjyrë blu e Django admin */
    color: white !important;
    border: 1px solid #417690;
    padding: 10px 15px;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
}

.btn-back-to-list:hover {
    background-color: #205067; /* Ngjyrë blu më e errët */
    color: white !important;
    text-decoration: none;
}

/* Butoni Download - I NJËJTË SI NË LISTË */
.btn-download {
    background-color: #417690; /* Ngjyrë blu e Django admin */
    color: white !important;
    border: 1px solid #417690;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.btn-download:hover {
    background-color: #205067; /* Ngjyrë blu më e errët */
    color: white !important;
}

/* Pagination Links - I NJËJTË SI NË LISTË */
.pagination-link {
    background-color: #417690; /* Ngjyrë blu e Django admin */
    color: white !important;
    border: 1px solid #417690;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: inline-block;
    margin: 0 2px;
    min-width: 60px;
    text-align: center;
}

.pagination-link:hover {
    background-color: #205067; /* Ngjyrë blu më e errët */
    color: white !important;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Specific styling for first/last buttons - I NJËJTË SI NË LISTË */
.pagination-first,
.pagination-last {
    background-color: #5a6268; /* Ngjyrë pak më e çelët */
}

.pagination-first:hover,
.pagination-last:hover {
    background-color: #3d4347; /* Ngjyrë më e errët */
}

/* Për butonat e paaktivizuar - I NJËJTË SI NË LISTË */
.pagination-link.disabled {
    background-color: #cccccc;
    color: #666666 !important;
    border-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-link.disabled:hover {
    background-color: #cccccc;
    color: #666666 !important;
    transform: none;
}

/* ===== GENERAL STYLES ===== */
.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 */
.country-al,
.country-alb {
    background-image: url("https://flagcdn.com/al.svg");
    background-size: cover;
    background-position: center;
    background-color: transparent;
}

.country-bih {
    background-image: url("https://flagcdn.com/ba.svg");
    background-size: cover;
    background-position: center;
    background-color: transparent;
}

.country-mne {
    background-image: url("https://flagcdn.com/me.svg");
    background-size: cover;
    background-position: center;
    background-color: transparent;
}

.country-nmk {
    background-image: url("https://flagcdn.com/mk.svg");
    background-size: cover;
    background-position: center;
    background-color: transparent;
}

.country-kos,
.country-KOS,
.country-xk,
.country-XK {
    background-image: url("https://flagcdn.com/xk.svg");
    background-size: cover;
    background-position: center;
    background-color: transparent;
}

.country-srb {
    background-image: url("https://flagcdn.com/rs.svg");
    background-size: cover;
    background-position: center;
    background-color: transparent;
}

.keyword-tag {
    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;
}

.category-tag {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px 0;
    background-color: #e7f4e4;
    border: 1px solid #b8d8b0;
    border-radius: 3px;
    font-size: 0.85em;
    color: #2d5016;
}

/* Stilizime të reja për përmbajtjen e përditësuar */
.admin-style-detail {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.module {
    margin-bottom: 20px;
}

.module h2 {
    background: #f8f8f8;
    padding: 8px 12px;
    margin: 0;
    border-bottom: 1px solid #e1e1e1;
    font-size: 14px;
    font-weight: bold;
}

.description {
    padding: 8px 12px;
    background: #f0f0f0;
    border-bottom: 1px solid #e1e1e1;
    font-style: italic;
    color: #666;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.form-row:last-child {
    border-bottom: none;
}

.field-box {
    flex: 1;
    min-width: 300px;
    padding: 0 10px;
    margin-bottom: 10px;
}

.field-box.full-width {
    flex: 0 0 100%;
}

.field-box label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.readonly {
    padding: 8px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 3px;
    min-height: 20px;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role-badge {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.organization-details {
    line-height: 1.4;
}

.graphic-overview-container {
    text-align: center;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    background: #fafafa;
}

.graphic-overview-image {
    max-width: 100%;
    max-height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.graphic-overview-actions {
    margin-top: 10px;
}

.btn-external {
    display: inline-block;
    padding: 8px 15px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.external-link {
    word-break: break-all;
}

.identifier {
    font-family: monospace;
    background: #f8f9fa;
}

.text-muted {
    color: #6c757d !important;
    font-style: italic;
}

.error-message {
    padding: 20px;
    color: #d9534f;
    background: #fdf7f7;
    border: 1px solid #ebccd1;
    border-radius: 4px;
    margin: 10px 0;
}

/* Record Navigation Styles */
.record-navigation {
    background: #f8f8f8;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    text-align: center;
}

.step-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.step-links .current {
    margin: 0 15px;
    font-weight: bold;
    color: #333;
}

/* Footer Actions - Butonat në fund në të njëjtin rresht */
.footer-actions {
    padding: 15px 0;
    border-top: 1px solid #e1e1e1;
    margin-top: 20px;
}

/* Përshtatje për mobile */
@media (max-width: 768px) {
    .step-links {
        flex-direction: column;
        gap: 5px;
    }
    
    .step-links .current {
        margin: 10px 0;
    }
    
    .pagination-link {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 50px;
    }
    
    .field-box {
        min-width: 100%;
    }
    
    .footer-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-actions > div {
        width: 100%;
    }
    
    .footer-actions .btn-back-to-list,
    .footer-actions .btn-download {
        width: 100%;
        text-align: center;
    }
}

/* Additional responsive improvements for very small screens */
@media (max-width: 576px) {
    .btn-back-to-list,
    .btn-download,
    .pagination-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .step-links .current {
        font-size: 14px;
    }
}

/* Improved focus states for accessibility */
.btn-back-to-list:focus,
.btn-download:focus,
.pagination-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(65, 118, 144, 0.25); /* Django admin blue */
    outline: none;
}

/* Better visual feedback for interactive elements */
.btn-back-to-list:hover,
.btn-download:hover,
.pagination-link:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Enhanced styling for dropdown menu */
.dropdown-menu {
    border: 1px solid #417690;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 8px 16px;
    color: #333;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #205067;
}

/* Ensure consistent button styling across the application */
.btn-back-to-list,
.btn-download,
.pagination-link {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

/* Fix for dropdown toggle arrow color */
.btn-download.dropdown-toggle::after {
    border-top-color: white;
    margin-left: 8px;
}

.btn-download.dropdown-toggle:hover::after {
    border-top-color: white;
}

/* Header styling adjustments */
.page-header {
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

/* Ensure all buttons have the same height and alignment */
.btn-back-to-list,
.btn-download {
    height: 42px;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-link {
    height: 38px;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Fix for dropdown button alignment */
.btn-group .btn-download {
    display: inline-flex;
    align-items: center;
}

/* Hover effects for all buttons */
.btn-back-to-list:hover,
.btn-download:hover,
.pagination-link:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success states */
.success {
    border-left: 4px solid #28a745 !important;
}