/**
 * Fondsarchiv Shortcode Styles
 * Styling for [fondsarchiv] shortcode output
 */

/* Table Title - hide separate h3 since we use thead now */
h3.fondspartner {
    display: none;
}

/* Main Table Container */
.fondsarchiv-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* Table Header */
.fondsarchiv-table thead tr {
    background: #f9fafb;
}

.fondsarchiv-table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.95rem;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.fondsarchiv-table thead th:last-child {
    text-align: right;
    width: 100px;
}

/* Table Body Rows */
.fondsarchiv-table tbody tr {
    background-color: #ffffff;
    transition: background-color 0.15s ease;
}

.fondsarchiv-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Table Cells */
.fondsarchiv-table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    font-size: 0.925rem;
    color: #374151;
    border-bottom: 1px solid #f0f0f0;
}

.fondsarchiv-table tbody tr:last-child td {
    border-bottom: none;
}

/* First column - File name/description */
.fondsarchiv-table td:first-child {
    font-weight: 400;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Second column - Link */
.fondsarchiv-table td:last-child {
    text-align: right;
    width: 100px;
    white-space: nowrap;
}

/* Green Öffnen Button */
.fondsarchiv-table td:last-child a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #34d399;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.fondsarchiv-table td:last-child a:hover {
    background: #10b981;
    transform: translateY(-1px);
}

/* Empty cell placeholder */
.fondsarchiv-table td:last-child:empty::after {
    content: "\00a0";
}

/* ===== Mobile Responsive ===== */
@media (max-width: 480px) {
    .fondsarchiv-table {
        border-radius: 10px;
    }

    /* Header on mobile */
    .fondsarchiv-table thead th {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .fondsarchiv-table thead th:first-child {
        width: auto;
    }

    .fondsarchiv-table thead th:last-child {
        width: 85px;
        font-size: 0.9rem;
    }

    /* Body cells on mobile */
    .fondsarchiv-table td {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .fondsarchiv-table td:first-child {
        /* Allow text to wrap on mobile */
        word-break: break-word;
        hyphens: auto;
    }

    .fondsarchiv-table td:last-child {
        width: 75px;
        padding-left: 0.5rem;
    }

    /* Smaller button on mobile */
    .fondsarchiv-table td:last-child a {
        padding: 0.45rem 0.875rem;
        font-size: 0.8rem;
    }
}

/* Tablet breakpoint */
@media (min-width: 481px) and (max-width: 768px) {

    .fondsarchiv-table thead th,
    .fondsarchiv-table td {
        padding: 0.9rem 1rem;
    }

    .fondsarchiv-table td:last-child {
        width: 90px;
    }
}