/**
 * Önkormányzati Dokumentumtár - Frontend stílusok
 * Modern, dizájnos megjelenés önkormányzati oldalakhoz
 */

/* Fő konténer */
.onk-dokumentumtar {
    display: grid;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Oszlopok */
.onk-doc-columns-1 {
    grid-template-columns: 1fr;
}

.onk-doc-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.onk-doc-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.onk-doc-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Kategória doboz */
.onk-doc-category {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
    transition: box-shadow 0.3s ease;
}

.onk-doc-category:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Kategória fejléc */
.onk-doc-category-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    padding: 16px 20px;
    border-bottom: 3px solid #c99c33;
}

.onk-doc-category-header h3 {
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
}

/* Dokumentum lista */
.onk-doc-list {
    padding: 0;
    margin: 0;
}

/* Dokumentum elem */
.onk-doc-item {
    border-bottom: 1px solid #eee;
}

.onk-doc-item:last-child {
    border-bottom: none;
}

/* Dokumentum link */
.onk-doc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    background: #fff;
}

.onk-doc-link:hover {
    background: #f8f9fa;
    color: #1e3a5f;
}

.onk-doc-link:focus {
    outline: none;
    background: #f0f4f8;
}

/* Fájltípus ikon */
.onk-doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.onk-doc-icon.onk-doc-filetype {
    /* Színek inline style-ból jönnek */
}

.onk-doc-icon svg {
    width: 20px;
    height: 20px;
}

/* Letöltés gomb */
.onk-doc-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #666;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.onk-doc-link:hover .onk-doc-download {
    opacity: 1;
    color: #1e3a5f;
}

/* Külső link nyíl */
.onk-doc-external-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #666;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.onk-doc-link:hover .onk-doc-external-arrow {
    opacity: 1;
    color: #5c6bc0;
}

/* Dokumentum név */
.onk-doc-name {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

/* Üres állapot */
.onk-doc-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* Reszponzív */
@media (max-width: 992px) {
    .onk-doc-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .onk-doc-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .onk-dokumentumtar {
        gap: 20px;
    }

    .onk-doc-columns-2,
    .onk-doc-columns-3,
    .onk-doc-columns-4 {
        grid-template-columns: 1fr;
    }

    .onk-doc-category-header {
        padding: 14px 16px;
    }

    .onk-doc-category-header h3 {
        font-size: 15px;
    }

    .onk-doc-link {
        padding: 12px 16px;
    }

    .onk-doc-icon {
        width: 28px;
        height: 28px;
    }

    .onk-doc-name {
        font-size: 13px;
    }
}

/* Nyomtatási stílusok */
@media print {
    .onk-dokumentumtar {
        display: block;
    }

    .onk-doc-category {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #000;
    }

    .onk-doc-category-header {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .onk-doc-link:hover {
        background: transparent;
    }

    .onk-doc-icon {
        background: transparent;
        border: 1px solid #333;
    }
}

/* Accessibility */
.onk-doc-link:focus-visible {
    outline: 2px solid #1e3a5f;
    outline-offset: -2px;
}

/* Dark mode támogatás (ha a téma támogatja) */
@media (prefers-color-scheme: dark) {
    .onk-dokumentumtar.dark-mode .onk-doc-category {
        background: #1a1a2e;
        border-color: #2d2d44;
    }

    .onk-dokumentumtar.dark-mode .onk-doc-link {
        background: #1a1a2e;
        color: #e5e5e5;
    }

    .onk-dokumentumtar.dark-mode .onk-doc-link:hover {
        background: #252542;
    }

    .onk-dokumentumtar.dark-mode .onk-doc-item {
        border-color: #2d2d44;
    }

    .onk-dokumentumtar.dark-mode .onk-doc-icon {
        background: #2d2d44;
        color: #6ea8fe;
    }
}

/* ========================================
   Egyedi fájl shortcode stílusok
   ======================================== */

/* Közös stílusok */
.onk-doc-single {
    margin: 16px 0;
}

/* Teljes stílus - ugyanaz mint a listában */
.onk-doc-style-full .onk-doc-item {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.onk-doc-style-full .onk-doc-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Gomb stílus */
.onk-doc-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
    border: none;
}

.onk-doc-button:hover {
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
}

.onk-doc-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
}

.onk-doc-button .onk-doc-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.onk-doc-button svg {
    width: 16px;
    height: 16px;
    margin-left: auto;
}

.onk-doc-button-text {
    flex: 1;
}

/* Kompakt stílus */
.onk-doc-link-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1e3a5f;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.onk-doc-link-compact:hover {
    background: #f0f4f8;
    color: #2c5282;
}

.onk-doc-icon-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.onk-doc-icon-small svg {
    width: 16px;
    height: 16px;
}

/* Hiba üzenet */
.onk-doc-error {
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    margin: 16px 0;
}

/* Reszponzív - gomb stílus */
@media (max-width: 768px) {
    .onk-doc-button {
        width: 100%;
        justify-content: center;
    }
}