/**
 * Style dla pluginu ZG Funerals Schedule
 */

/* Kontener główny */
.zgf-schedule-container {
    font-family: 'Arial', sans-serif;
    max-width: 100%;
    margin: 20px 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* Wyszukiwarka */
.zgf-search-container {
    padding: 15px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#zgf-search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#zgf-search-button,
#zgf-search-clear {
    padding: 8px 15px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#zgf-search-clear {
    background-color: #e74c3c;
}

#zgf-search-button:hover {
    background-color: #2980b9;
}

#zgf-search-clear:hover {
    background-color: #c0392b;
}

.zgf-search-results-info {
    padding: 10px 15px;
    background-color: #ecf0f1;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #34495e;
}

/* Informacje o aktualizacji */
.zgf-update-info {
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
    color: #7f8c8d;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.zgf-update-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.zgf-update-info i {
    color: #3498db;
}

/* Sekcje */
.zgf-section {
    margin-bottom: 30px;
    padding: 0 0 20px;
    border-bottom: 1px solid #e0e0e0;
}

.zgf-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Tytuły sekcji */
.zgf-section-title {
    background-color: #f8f8f8;
    color: #2c3e50;
    padding: 15px 20px;
    margin: 0 0 15px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.8em;
}

/* Kontener danych */
.zgf-data-container {
    padding: 15px;
    position: relative;
}

/* Tabela z terminarzem */
.zgf-schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    table-layout: fixed;
}

.zgf-schedule-table th,
.zgf-schedule-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Szerokości kolumn */
.zgf-schedule-table th.zgf-name,
.zgf-schedule-table td.zgf-name {
    width: 20%;
}

.zgf-schedule-table th.zgf-time-display,
.zgf-schedule-table td.zgf-time-display,
.zgf-schedule-table th.zgf-time-ceremony,
.zgf-schedule-table td.zgf-time-ceremony,
.zgf-schedule-table th.zgf-time-removal,
.zgf-schedule-table td.zgf-time-removal {
    width: 10%;
    text-align: center;
}

.zgf-schedule-table th.zgf-cemetery,
.zgf-schedule-table td.zgf-cemetery {
    width: 20%;
}

.zgf-schedule-table th.zgf-location,
.zgf-schedule-table td.zgf-location {
    width: 15%;
}

.zgf-schedule-table th {
    background-color: #f8f8f8;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
}

.zgf-schedule-table tr.even {
    background-color: #f9f9f9;
}

.zgf-schedule-table tr.odd {
    background-color: #ffffff;
}

.zgf-schedule-table tr:hover {
    background-color: #f1f8ff;
}

/* Kolumny tabeli */
.zgf-name {
    font-weight: 600;
    min-width: 200px;
}

/* Legenda */
.zgf-legend {
    margin: 15px 0 0 0;
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    font-size: 0.9em;
    color: #555;
    border: 1px solid #e0e0e0;
}

.zgf-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zgf-legend-item i {
    color: #2980b9;
    font-size: 1.1em;
}

.zgf-legend-item span {
    font-style: italic;
}

/* Link do nekrologu */
.zgf-obituary-link {
    color: #2980b9;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.zgf-obituary-link:hover {
    text-decoration: underline;
}

.zgf-necro-link {
    margin-left: 5px;
    color: #2980b9;
}

.zgf-necro-link i {
    font-size: 0.9em;
}

/* Cmentarz z pinezką */
.zgf-cemetery {
    position: relative;
}

.zgf-cemetery-link {
    text-decoration: none;
    color: #3498db;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.zgf-cemetery-link:hover {
    text-decoration: underline;
}

.zgf-map-pin {
    color: #e74c3c;
    font-size: 1.1em;
}

/* Kolumna lokalizacji */
.zgf-location {
    font-weight: 500;
}

/* Informacja o braku danych */
.zgf-no-data {
    padding: 30px;
    text-align: center;
    color: #7f8c8d;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin: 0 15px;
}

/* Animacja ładowania */
.zgf-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.zgf-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #09f;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Stopka tabeli */
.zgf-footer {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
}

.zgf-footer small {
    color: #7f8c8d;
}

.zgf-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.zgf-footer a:hover {
    text-decoration: underline;
}

/* Responsywność */
@media screen and (max-width: 768px) {
    .zgf-search-container {
        flex-direction: column;
        align-items: stretch;
    }

    #zgf-search-input {
        width: 100%;
    }

    #zgf-search-button,
    #zgf-search-clear {
        width: 100%;
        justify-content: center;
    }

    .zgf-section-title {
        font-size: 1.6em;
        padding: 12px 15px;
    }

    .zgf-schedule-table {
        display: block;
        overflow-x: auto;
    }

    .zgf-schedule-table th,
    .zgf-schedule-table td {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    .zgf-name {
        min-width: 150px;
    }

    .zgf-footer {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* Style dla panelu admina */
.zgf-admin-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

.zgf-admin-section h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.zgf-schedule-table .zgf-time-display,
.zgf-schedule-table .zgf-time-ceremony,
.zgf-schedule-table .zgf-time-removal {
    text-align: center;
}