/*
 * ====================================================================
 * PENALTIES TABLE STYLES (penalty_bs5.twig)
 * ====================================================================
 * Hero styles are defined in custom-bootstrap.css
 */

/* Content Wrapper */
.penalty-table-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* KPI Boxes */
.kpi-box {
    background: linear-gradient(135deg, var(--fm-dark) 0%, var(--fm-dark-gray) 50%, #434343 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: var(--bs-border-radius-lg);
    color: var(--bs-white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(182, 139, 71, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kpi-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--fm-gold);
    opacity: 0.8;
}

.kpi-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    border-color: var(--fm-gold);
}

.kpi-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--fm-gold);
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.kpi-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* Filter Buttons */
.penalty-filter-group .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    transition: all 0.3s ease;
}

.penalty-filter-group .btn.active {
    background-color: var(--fm-gold);
    border-color: var(--fm-gold);
    color: var(--fm-dark);
}

/* Team Logo - uses central --fm-logo-* variables */
.team-logo {
    width: var(--fm-logo-md);
    height: var(--fm-logo-md);
    object-fit: contain;
}

/* Table Styles */
/* Removed CSS counter - rankings are set via JavaScript */

/* Table Improvements */
/* Let Bootstrap handle default table header styling for consistency */

/* Standard Bootstrap table styling is used */

/* Penalty Values */
.penalty-damage-value {
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--fm-gold), var(--fm-gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.penalty-mobile-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--fm-gold);
    margin-bottom: 0.5rem;
}

/* Rank Cell Styling */
.rank-cell {
    font-weight: bold;
    width: 60px;
}

/* Mobile Details Row */
.mobile-details-row td {
    padding: 0;
}

.mobile-details-row .bg-light {
    background-color: rgba(248, 249, 250, 0.8) !important;
}

/* Show Details Button */
.show-details {
    color: var(--fm-gold);
    text-decoration: underline;
}

.show-details:hover {
    color: var(--fm-gold-dark);
}

/* Info Button */
.btn-link i {
    color: var(--fm-gold);
    transition: color 0.3s ease;
}

.btn-link:hover i {
    color: var(--fm-gold-dark);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .penalty-table-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .kpi-box {
        padding: 1.5rem 1rem;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .kpi-label {
        font-size: 0.7rem;
    }
    
    .team-logo {
        width: var(--fm-logo-sm);
        height: var(--fm-logo-sm);
    }
    
    .penalty-damage-value {
        font-size: 1rem;
    }
    
    #penalty_table thead th {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .penalty-filter-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    #penalty_table {
        font-size: 0.875rem;
    }
    
    /* Mobile Penalty Card Optimierungen */
    .penalty-info-content {
        padding: 1rem;
    }
    
    .penalty-info-scroll {
        font-size: 0.85rem;
        padding-right: 0.75rem;
    }
    
    .penalty-euro-amount {
        font-size: 1.75rem !important;
    }
    
    .penalty-amount-box {
        padding: 0.3em 0.6em !important;
    }
    
    .penalty-incidents-box {
        padding: 0.25em 0.5em !important;
    }
    
    .penalty-incidents {
        font-size: 0.8rem !important;
    }
    
    .penalty-value-prominent {
        top: 40% !important;
    }
    
    .penalty-card-title {
        min-height: 50px;
        font-size: 0.8rem;
    }
}

/* Bootstrap Table Overrides */
.bootstrap-table .fixed-table-container {
    border: none;
}

.bootstrap-table .table {
    margin-bottom: 0;
}

/* Hover Effects */
#penalty_table tbody tr:hover {
    background-color: rgba(182, 139, 71, 0.1);
}

/* Bootstrap Modal Navigation Styles für Penalty Gallery */
/* Uses unified navigation components from custom-bootstrap.css */
/* Apply .fm-nav-btn, .fm-nav-prev, .fm-nav-next classes in templates */

.penalty-counter {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Penalty Card Styles - orientiert am Original */
.penalty-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.penalty-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.penalty-card-title {
    background-color: var(--bs-light);
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Logo-Bereich mit hellem Farbverlauf */
.penalty-logo-area {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 249, 250, 0.85) 25%,
        rgba(230, 230, 230, 0.75) 50%, 
        rgba(220, 220, 220, 0.85) 75%,
        rgba(210, 210, 210, 0.9) 100%) !important;
    position: relative;
}

/* Zusätzlicher subtiler Overlay-Effekt für mehr Tiefe */
.penalty-logo-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.4) 0%, transparent 65%);
    pointer-events: none;
}

/* Hover-Effekt für den Logo-Bereich */
.penalty-card:hover .penalty-logo-area {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(248, 249, 250, 0.9) 25%,
        rgba(240, 240, 240, 0.8) 50%, 
        rgba(230, 230, 230, 0.9) 75%,
        rgba(220, 220, 220, 0.95) 100%) !important;
}

/* Prominenter Betrag Styling - analog Hero Banner */
.penalty-value-prominent {
    pointer-events: none;
}

.penalty-amount-box {
    background: rgba(0, 0, 0, 0.75);
    padding: 0.4em 0.8em;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.penalty-euro-amount {
    color: var(--fm-gold) !important;
    font-family: var(--fm-font-display);
    font-size: 2.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

.penalty-incidents-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3em 0.6em;
    border-radius: 4px;
    width: fit-content;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.penalty-incidents {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--fm-dark);
    margin: 0;
}

/* Team Logo Styling */
.penalty-team-logo {
    max-height: 70%;
    max-width: 70%;
    object-fit: contain;
}

/* Gallery Trigger Styling */
.penalty-gallery-trigger:hover {
    background: var(--fm-gold) !important;
    color: var(--fm-white) !important;
    transform: scale(1.1);
    text-decoration: none;
}

/* Penalty Info Overlay - deckt gesamte Kachel ab */
.penalty-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(23, 23, 23, 0.95);
    color: var(--fm-white);
    border-radius: var(--bs-border-radius);
    z-index: 15;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    backdrop-filter: blur(2px);
}

.penalty-info-overlay.show {
    opacity: 1;
    visibility: visible;
}

.penalty-info-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.penalty-info-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
}

.penalty-description-text {
    line-height: 1.5;
    color: var(--fm-white);
}

.penalty-description-text a {
    color: var(--fm-gold);
    text-decoration: underline;
}

.penalty-description-text a:hover {
    color: var(--fm-gold-light);
}

/* Scrollbar Styling für Overlay */
.penalty-info-scroll::-webkit-scrollbar {
    width: 6px;
}

.penalty-info-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.penalty-info-scroll::-webkit-scrollbar-thumb {
    background: var(--fm-gold);
    border-radius: 3px;
}

.penalty-info-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--fm-gold-light);
}

/* Mehr Informationen Button */
.penalty-card .card-footer .btn {
    transition: all 0.3s ease;
    font-weight: 600;
}

.penalty-card .card-footer .btn:hover {
    background-color: var(--fm-gold);
    border-color: var(--fm-gold);
    color: var(--fm-white);
    transform: translateY(-1px);
}

/* Print Styles */
@media print {
    .penalty-filter-group,
    .form-select,
    .show-details,
    .btn-link,
    .penalty-info-overlay {
        display: none;
    }
    
    #penalty_table {
        break-inside: avoid;
    }
}