/**
 * Style publiczne BIP System
 *
 * @package BIP_System
 * @subpackage Frontend
 * @since 1.0.0
 */

/* Formularz wyszukiwania */
.bip-search-form {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.bip-search-form form {
    display: flex;
    gap: 10px;
}

.bip-search-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.bip-search-button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.bip-search-button:hover {
    background: #005177;
}

/* Lista dokumentów */
.bip-documents-list {
    margin: 20px 0;
}

.bip-documents {
    list-style: none;
    padding: 0;
}

.bip-document-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
}

.bip-document-item h3 {
    margin: 0 0 10px 0;
}

.bip-document-item h3 a {
    color: #0073aa;
    text-decoration: none;
}

.bip-document-item h3 a:hover {
    text-decoration: underline;
}

.bip-document-date,
.bip-document-author {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.bip-document-excerpt {
    margin: 10px 0;
    line-height: 1.6;
}

/* Dane podmiotu */
.bip-entity-info {
    margin: 20px 0;
}

.bip-entity-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.bip-entity-table th {
    text-align: left;
    padding: 10px;
    font-weight: bold;
    vertical-align: top;
    width: 200px;
}

.bip-entity-table td {
    padding: 10px;
    vertical-align: top;
}

.bip-entity-table tr {
    border-bottom: 1px solid #ddd;
}

.bip-entity-table a {
    color: #d63638;
    text-decoration: underline;
}

/* Statystyki BIP */
.bip-statistics {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.bip-statistics h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0073aa;
    font-size: 1.5rem;
}

.bip-statistics h4 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

.bip-statistics-summary {
    margin-bottom: 20px;
}

.bip-statistics-summary p {
    margin: 10px 0;
    line-height: 1.8;
    font-size: 1rem;
}

.bip-statistics-summary a {
    color: #0073aa;
    text-decoration: none;
}

.bip-statistics-summary a:hover {
    text-decoration: underline;
}

.bip-statistics-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: #fff;
}

.bip-statistics-table thead {
    background: #0073aa;
    color: #fff;
}

.bip-statistics-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.bip-statistics-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.bip-statistics-table tbody tr:hover {
    background: #f5f5f5;
}

.bip-statistics-table td {
    padding: 10px 15px;
}

.bip-statistics-popular {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}

.bip-popular-documents-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.bip-popular-documents-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.6;
}

.bip-popular-documents-list li:last-child {
    border-bottom: none;
}

.bip-popular-documents-list a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.bip-popular-documents-list a:hover {
    text-decoration: underline;
}

.bip-popular-views {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .bip-statistics-table {
        font-size: 0.9rem;
    }
    
    .bip-statistics-table th,
    .bip-statistics-table td {
        padding: 8px 10px;
    }
}

/* Ostatnie zmiany (Recent Changes) */
.bip-recent-changes {
    margin: 20px 0;
}

.bip-recent-changes-filters {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.bip-recent-changes-filters form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.bip-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bip-filter-group label {
    font-weight: 600;
    font-size: 14px;
}

.bip-filter-group input[type="date"] {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bip-filter-button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}

.bip-filter-button:hover {
    background: #005177;
}

.bip-reset-filter {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.bip-reset-filter:hover {
    background: #e0e0e0;
}

.bip-changes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bip-change-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
}

.bip-change-date {
    flex-shrink: 0;
    color: #666;
    font-size: 13px;
    min-width: 150px;
}

.bip-change-content {
    flex: 1;
    line-height: 1.6;
}

.bip-change-content strong {
    color: #0073aa;
}

.bip-change-content a {
    color: #0073aa;
    text-decoration: none;
}

.bip-change-content a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .bip-recent-changes-filters form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bip-filter-group {
        width: 100%;
    }
    
    .bip-change-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .bip-change-date {
        min-width: auto;
    }
}
