/**
 * Úřední deska widget - Styly inspirované MySchool šablonou
 *
 * @package Eobce
 */

/* ========================================
   FILTRY A VYHLEDÁVÁNÍ
   ======================================== */

.eobce-uredni-deska-enhanced {
    margin: 40px 0;
}

.eobce-deska-filters {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.eobce-filter-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.eobce-filter-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    color: #333333;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.eobce-filter-btn:hover {
    border-color: #2c5530;
    color: #2c5530;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.15);
}

.eobce-filter-btn.active {
    background: linear-gradient(135deg, #2c5530 0%, #177326 100%);
    border-color: #2c5530;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
}

.eobce-filter-btn i {
    font-size: 18px;
}

/* Filter controls */
.eobce-filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.eobce-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.eobce-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.eobce-search-input:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.eobce-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #666666;
    font-size: 18px;
    padding: 8px 12px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.eobce-search-btn:hover {
    color: #2c5530;
}

.eobce-year-filter select,
.eobce-sorting select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.eobce-year-filter select:focus,
.eobce-sorting select:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

/* Loading */
.eobce-deska-loading {
    text-align: center;
    padding: 40px;
    color: #666666;
    font-size: 16px;
}

.eobce-deska-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5530;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   SEZNAM OZNÁMENÍ
   ======================================== */

.eobce-deska-results {
    transition: opacity 0.3s ease;
}

.eobce-deska-list {
    display: grid;
    gap: 20px;
}

/* Layout - List (výchozí) */
.layout-list .eobce-deska-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #2c5530;
}

/* Layout - Grid */
.layout-grid .eobce-deska-list {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.layout-grid .eobce-deska-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid #2c5530;
}

/* Layout - Cards */
.layout-cards .eobce-deska-list {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.layout-cards .eobce-deska-item {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.layout-cards .eobce-deska-item::before {
    content: '';
    display: block;
    height: 6px;
    background: linear-gradient(90deg, #2c5530 0%, #177326 100%);
}

.layout-cards .eobce-deska-item > div {
    padding: 25px;
}

/* Hover efekty */
.eobce-deska-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Header */
.eobce-deska-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.eobce-deska-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2e0a13;
    flex: 1;
}

.eobce-deska-title a {
    color: #2e0a13;
    text-decoration: none;
    transition: color 0.3s ease;
}

.eobce-deska-title a:hover {
    color: #2c5530;
}

/* Badge */
.eobce-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.eobce-badge.priority-high {
    background: linear-gradient(135deg, #c92127 0%, #a31d22 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(201, 33, 39, 0.3);
}

/* Meta údaje */
.eobce-deska-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.eobce-deska-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666666;
}

.eobce-deska-meta .meta-item i {
    color: #2c5530;
    font-size: 16px;
}

.eobce-deska-meta .meta-item strong {
    color: #333333;
}

/* Excerpt */
.eobce-deska-excerpt {
    margin-bottom: 15px;
    color: #666666;
    line-height: 1.6;
}

/* Přílohy */
.eobce-deska-attachments {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid #e5c687;
}

.eobce-deska-attachments strong {
    display: block;
    margin-bottom: 10px;
    color: #333333;
    font-size: 14px;
}

.eobce-deska-attachments strong i {
    color: #2c5530;
    margin-right: 5px;
}

.eobce-deska-attachments ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eobce-deska-attachments li {
    margin-bottom: 8px;
}

.eobce-deska-attachments a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2c5530;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.eobce-deska-attachments a:hover {
    color: #177326;
    transform: translateX(5px);
}

.eobce-deska-attachments a i {
    font-size: 18px;
    color: #c92127;
}

/* Footer */
.eobce-deska-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.eobce-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2c5530 0%, #177326 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.eobce-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    color: #ffffff;
}

.eobce-button i {
    font-size: 16px;
}

/* No results */
.eobce-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999999;
    font-size: 16px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .eobce-filter-tabs {
        flex-direction: column;
    }

    .eobce-filter-btn {
        width: 100%;
    }

    .eobce-filter-controls {
        flex-direction: column;
    }

    .eobce-search-box,
    .eobce-year-filter select,
    .eobce-sorting select {
        width: 100%;
    }

    .eobce-deska-header {
        flex-direction: column;
    }

    .eobce-deska-meta {
        flex-direction: column;
        gap: 10px;
    }

    .layout-grid .eobce-deska-list,
    .layout-cards .eobce-deska-list {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ANIMACE
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eobce-deska-item {
    animation: fadeIn 0.5s ease forwards;
}

.eobce-deska-item:nth-child(1) { animation-delay: 0.1s; }
.eobce-deska-item:nth-child(2) { animation-delay: 0.2s; }
.eobce-deska-item:nth-child(3) { animation-delay: 0.3s; }
.eobce-deska-item:nth-child(4) { animation-delay: 0.4s; }
.eobce-deska-item:nth-child(5) { animation-delay: 0.5s; }
