/**
 * Croatian Football Clubs CH - Styles
 * Responsive accordion styles for club display
 */

/* Wrapper */
.hrklb-accordion-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* No data message */
.hrklb-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Section styling */
.hrklb-section {
    margin-bottom: 35px;
}

.hrklb-section-title {
    font-size: 20px;
    color: #2c3e50;
    margin: 35px 0 20px 0;
    padding: 12px 0 12px 35px;
    border-bottom: 3px solid #e9ecef;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.hrklb-section-title::before {
    content: '⚽';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    filter: grayscale(1);
}

.hrklb-section-title:first-child {
    margin-top: 0;
}

.hrklb-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.hrklb-section-futsal .hrklb-section-title {
    color: #e91e63;
}

.hrklb-section-futsal .hrklb-section-title::before {
    content: '🏐';
    filter: none;
}

.hrklb-section-futsal .hrklb-section-title::after {
    background: linear-gradient(90deg, #e91e63 0%, #f06292 100%);
}

.hrklb-section-priority .hrklb-section-title {
    color: #2e7d32;
}

.hrklb-section-priority .hrklb-section-title::before {
    content: '⚽';
    filter: none;
}

.hrklb-section-priority .hrklb-section-title::after {
    background: linear-gradient(90deg, #2e7d32 0%, #4caf50 100%);
}

/* Accordion items */
.hrklb-club-item {
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    overflow: hidden;
}

.hrklb-club-item[open] {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

/* Summary (clickable header) */
.hrklb-club-summary {
    padding: 18px 20px 18px 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    transition: all 0.2s ease;
    list-style: none;
    position: relative;
}

.hrklb-club-summary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #e1e5e9 100%);
    color: #1a252f;
}

.hrklb-club-summary::-webkit-details-marker {
    display: none;
}

/* Custom arrow indicator */
.hrklb-club-summary::before {
    content: '▶';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #6c757d;
}

.hrklb-club-item[open] .hrklb-club-summary::before {
    transform: translateY(-50%) rotate(90deg);
    color: #495057;
}

/* Club name */
.hrklb-club-name {
    display: block;
}

/* Content area */
.hrklb-club-content {
    padding: 25px;
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
}

/* Club info layout */
.hrklb-club-info {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #f1f3f4;
}

/* Logo */
.hrklb-club-logo {
    flex-shrink: 0;
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
}

.hrklb-club-logo img {
    max-width: 100%;
    max-height: 80px;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Details list */
.hrklb-club-details {
    flex: 1;
}

.hrklb-details-list {
    margin: 0;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px 15px;
    font-size: 14px;
    line-height: 1.4;
}

.hrklb-details-list dt {
    font-weight: 600;
    color: #666;
    font-size: 13px;
}

.hrklb-details-list dd {
    margin: 0;
    color: #444;
    font-size: 14px;
}

.hrklb-details-list a {
    color: #0073aa;
    text-decoration: none;
}

.hrklb-details-list a:hover {
    text-decoration: underline;
}

/* Widget/iframe container */
.hrklb-club-widget {
    margin-top: 0;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #f1f3f4;
    max-width: 100%;
    overflow: hidden;
}

.hrklb-club-widget iframe {
    max-width: 100%;
    height: auto;
    min-height: 400px;
    border-radius: 4px;
}

/* Special handling for football.ch widgets */
.hrklb-club-widget iframe.sfvFullHeight {
    width: 100%;
    min-height: 500px;
    height: 600px;
    border-radius: 4px;
}

/* FuPa widget specific styles */
.hrklb-club-widget [id^="fp-widget_root-"] {
    min-height: 350px;
    width: 100%;
    background: #f8f9fa;
    border-radius: 4px;
    position: relative;
}

/* Loading indicator for FuPa widgets */
.hrklb-club-widget [id^="fp-widget_root-"]:empty::before {
    content: "Widget wird geladen...";
    display: block;
    text-align: center;
    padding: 50px 20px;
    color: #666;
    font-style: italic;
}

/* FuPa widget fallback link styling */
.hrklb-club-widget [id^="fp-widget_root-"] > a {
    display: block;
    text-align: center;
    padding: 40px 20px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.hrklb-club-widget [id^="fp-widget_root-"] > a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .hrklb-accordion-wrapper {
        padding: 10px 0;
    }
    
    .hrklb-section-title {
        font-size: 18px;
        margin: 25px 0 15px 0;
        padding: 12px 0 12px 30px;
    }
    
    .hrklb-section-title::before {
        font-size: 16px;
    }
    
    .hrklb-club-info {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .hrklb-club-logo {
        width: 80px;
        margin: 0 auto;
        padding: 8px;
    }
    
    .hrklb-club-logo img {
        max-height: 60px;
    }
    
    .hrklb-details-list {
        grid-template-columns: 1fr;
        gap: 6px;
        font-size: 13px;
    }
    
    .hrklb-details-list dt {
        font-weight: 600;
        margin-top: 12px;
        font-size: 12px;
        color: #777;
    }
    
    .hrklb-details-list dt:first-child {
        margin-top: 0;
    }
    
    .hrklb-details-list dd {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .hrklb-club-summary {
        font-size: 15px;
        padding: 15px 20px 15px 45px;
    }
    
    .hrklb-club-content {
        padding: 20px 15px;
    }
    
    .hrklb-club-widget {
        padding: 15px;
    }
    
    .hrklb-club-widget iframe {
        min-height: 350px;
    }
    
    .hrklb-club-widget iframe.sfvFullHeight {
        min-height: 450px;
        height: 500px;
    }
}

/* Schedule Widget & Shortcode Styles */
.hrklb-schedule-widget,
.hrklb-schedule-shortcode {
    margin: 20px 0;
}

.hrklb-schedule-title {
    font-size: 18px;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

.hrklb-schedule-item {
    margin-bottom: 25px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.hrklb-schedule-item:last-child {
    margin-bottom: 0;
}

.hrklb-schedule-club-name {
    font-size: 14px;
    color: #2e7d32;
    margin: 0 0 15px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hrklb-schedule-content {
    min-height: 200px;
}

/* Widget specific styles */
.widget .hrklb-schedule-widget {
    margin: 0;
}

.widget .hrklb-schedule-title {
    font-size: 16px;
    margin: 0 0 15px 0;
}

.widget .hrklb-schedule-item {
    margin-bottom: 20px;
    padding: 12px;
}

.widget .hrklb-schedule-club-name {
    font-size: 13px;
    margin: 0 0 12px 0;
}

.widget .hrklb-schedule-content {
    min-height: 180px;
}

/* Horizontal layout for shortcode */
.hrklb-layout-horizontal .hrklb-schedule-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Responsive styles for schedule */
@media (max-width: 768px) {
    .hrklb-schedule-item {
        padding: 12px;
    }
    
    .hrklb-schedule-club-name {
        font-size: 13px;
    }
    
    .hrklb-schedule-content {
        min-height: 160px;
    }
    
    .hrklb-layout-horizontal .hrklb-schedule-list {
        grid-template-columns: 1fr;
    }
    
    .widget .hrklb-schedule-content {
        min-height: 150px;
    }
}

/* Print styles */
@media print {
    .hrklb-club-item {
        page-break-inside: avoid;
    }
    
    .hrklb-club-item[open] {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .hrklb-club-widget,
    .hrklb-schedule-widget,
    .hrklb-schedule-shortcode {
        display: none;
    }
}