/**
 * Bildrechte-Tabelle Styles.
 * Update v5.8.0: Erstellt
 * Update v5.8.1: max-width, links-Ausrichtung, Thumbnail-Link-Cursor
 *
 * @package FourSystem_ECards
 */

/* Update v5.8.1: Wrapper links ausgerichtet wenn max-width gesetzt */
.fsec-credits-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tabelle */
.fsec-credits-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    font-size: 14px;
    line-height: 1.5;
}

.fsec-credits-table th,
.fsec-credits-table td {
    padding: 10px 15px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: middle;
}

/* Header */
.fsec-credits-table thead th {
    background: #f5f5f5;
    font-weight: normal;
    font-size: 13px;
    color: #333;
}

.fsec-credits-table thead th strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Spalte: Thumbnail */
.fsec-credits-col-thumb {
    width: 120px;
    text-align: center !important;
}

.fsec-credits-col-thumb img {
    display: block;
    width: 100px;
    height: auto;
    border-radius: 3px;
}

/* Update v5.8.1: Thumbnail-Links */
.fsec-credits-col-thumb a {
    display: block;
}

.fsec-credits-lightbox-link {
    cursor: pointer;
}

/* Spalte: Fotograf */
.fsec-credits-col-photo {
    min-width: 200px;
}

/* Spalte: Webseite */
.fsec-credits-col-source {
    min-width: 150px;
}

/* Links */
.fsec-credits-table a {
    color: #2271b1;
    text-decoration: none;
}

.fsec-credits-table a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Zeilen-Hover */
.fsec-credits-table tbody tr:hover {
    background: #f9f9f9;
}

/* Ladeanimation */
.fsec-credits-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #666;
    font-size: 13px;
}

.fsec-credits-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: fsec-spin 0.6s linear infinite;
}

@keyframes fsec-spin {
    to { transform: rotate(360deg); }
}

/* Sentinel (unsichtbar, triggert IntersectionObserver) */
.fsec-credits-sentinel {
    height: 1px;
}

/* Responsive: Mobile */
@media (max-width: 600px) {
    .fsec-credits-table,
    .fsec-credits-table thead,
    .fsec-credits-table tbody,
    .fsec-credits-table tr,
    .fsec-credits-table th,
    .fsec-credits-table td {
        display: block;
    }

    .fsec-credits-table thead {
        display: none;
    }

    .fsec-credits-table tr {
        border: 1px solid #ddd;
        margin-bottom: 10px;
        border-radius: 6px;
        overflow: hidden;
        background: #fff;
    }

    .fsec-credits-table td {
        border: none;
        border-bottom: 1px solid #eee;
        padding: 8px 12px;
        text-align: left;
    }

    .fsec-credits-table td:last-child {
        border-bottom: none;
    }

    .fsec-credits-col-thumb {
        width: auto;
        text-align: left !important;
    }

    .fsec-credits-col-thumb img {
        width: 80px;
    }

    .fsec-credits-col-photo::before {
        content: 'Fotograf: ';
        font-weight: 600;
        color: #666;
    }

    .fsec-credits-col-source::before {
        content: 'Webseite: ';
        font-weight: 600;
        color: #666;
    }

    /* Leere Zellen auf Mobile ausblenden */
    .fsec-credits-col-photo:empty,
    .fsec-credits-col-source:empty {
        display: none;
    }
}
