/* ==========================================================================
   MeczeClaude - Frontend Styles
   ========================================================================== */

/* Zawodnicy Grid */
.mecze-zawodnicy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.mecze-zawodnik-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mecze-zawodnik-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.zawodnik-photo {
    position: relative;
    margin-bottom: 15px;
}

.zawodnik-photo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.zawodnik-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #999;
    border: 3px solid #e1e1e1;
}

.zawodnik-photo-placeholder .dashicons {
    font-size: 30px;
}

.zawodnik-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #BA181C;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.zawodnik-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.zawodnik-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.zawodnik-position {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Rozgrywki List */
.mecze-rozgrywki-list {
    margin: 20px 0;
}

.mecze-rozgrywka-item {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.mecze-rozgrywka-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mecze-rozgrywka-item.past-match {
    opacity: 0.8;
}

.mecz-date-time {
    text-align: center;
}

.mecz-date {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.mecz-time {
    font-size: 14px;
    color: #666;
}

.mecz-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.team-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.team-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.mecz-vs {
    margin: 0 20px;
    text-align: center;
}

.mecz-vs-text {
    font-size: 14px;
    color: #999;
    font-weight: bold;
}

.mecz-score {
    font-size: 24px;
    font-weight: bold;
    color: #BA181C;
}

.mecz-details {
    text-align: center;
}

.mecz-venue {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.mecz-venue .dashicons {
    font-size: 16px;
    margin-right: 5px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.status-nadchodzacy {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.status-w-trakcie {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.status-zakonczony {
    background: #e8f5e8;
    color: #388e3c;
}

.status-badge.status-odwolany {
    background: #ffebee;
    color: #d32f2f;
}

/* Tabela Ligowa */
.mecze-tabela-ligowa {
    margin: 20px 0;
}

.mecze-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mecze-table th,
.mecze-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #e1e1e1;
}

.mecze-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.mecze-table .team {
    text-align: left;
    min-width: 150px;
}

.mecze-table .logo {
    width: 50px;
    text-align: center;
}

.team-logo-table {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 3px;
}

.team-logo-placeholder-table {
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    color: #999;
    font-size: 12px;
    margin: 0 auto;
}

.mecze-table .pos {
    width: 50px;
    font-weight: bold;
}

.mecze-table .punkty {
    font-size: 16px;
    color: #BA181C;
}

.mecze-table tr.our-team {
    background: #f0f8ff;
    font-weight: bold;
}

.mecze-table tr.our-team td {
    border-color: #BA181C;
}

.mecze-table .positive {
    color: #388e3c;
}

.mecze-table .negative {
    color: #d32f2f;
}

.mecze-tabela-legend {
    margin-top: 15px;
    text-align: center;
    color: #666;
}

/* Brak danych */
.mecze-no-data {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .mecze-zawodnicy-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .mecze-rozgrywka-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .mecz-teams {
        flex-direction: column;
        gap: 10px;
    }
    
    .mecz-vs {
        margin: 0;
    }
    
    .mecze-table {
        font-size: 14px;
    }
    
    .mecze-table th,
    .mecze-table td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .mecze-zawodnicy-grid {
        grid-template-columns: 1fr;
    }
    
    .mecze-table {
        font-size: 12px;
    }
    
    .mecze-table .team {
        min-width: 100px;
    }
}

/* ==========================================================================
   Widget Meczów - Nowy Widget Style
   ========================================================================== */

.mecze-widget-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    max-width: 1200px;
}

/* Header */
.mecze-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.mecze-widget-title h2 {
    color: #BA181C;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mecze-title-underline {
    width: 60px;
    height: 3px;
    background: #10b981;
    border-radius: 2px;
}

/* Countdown */
.mecze-countdown-container {
    text-align: right;
}

.mecze-countdown-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.mecze-countdown-time {
    font-size: 20px;
    font-weight: bold;
    color: #BA181C;
    font-family: 'Courier New', monospace;
}

.countdown-days, .countdown-hours, .countdown-minutes, .countdown-seconds {
    background: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
}

/* Matches Grid */
.mecze-widget-matches {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.mecze-widget-match {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mecze-widget-match:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Date Info */
.mecz-date-info {
    text-align: center;
    margin-bottom: 15px;
}

.mecz-date {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
}

.mecz-league {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* Teams */
.mecz-teams-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.team-widget {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.team-logo-widget {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}

.team-name-widget {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
}

/* VS Section */
.mecz-vs-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.mecz-score-widget {
    background: #BA181C;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    min-width: 60px;
}

.mecz-time-badge {
    background: white;
    color: #333;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e1e1e1;
    min-width: 50px;
    text-align: center;
}

/* Center Button */
.mecz-center-btn-container {
    text-align: center;
}

.mecz-center-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.mecz-center-btn.past-match-btn {
    background: #10b981;
    color: white;
}

.mecz-center-btn.past-match-btn:hover {
    background: #059669;
}

.mecz-center-btn.future-match-btn {
    background: #BA181C;
    color: white;
}

.mecz-center-btn.future-match-btn:hover {
    background: #A31621;
}

/* Footer */
.mecze-widget-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.mecze-footer-btn {
    background: #333;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mecze-footer-btn:hover {
    background: #1f2937;
}

/* Past Match Styling */
.mecze-widget-match.past-match {
    background: #f3f4f6;
}

.mecze-widget-match.past-match .mecz-date {
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .mecze-widget-matches {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mecze-widget-match:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .mecze-widget-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .mecze-countdown-container {
        text-align: center;
    }
    
    .mecze-widget-matches {
        grid-template-columns: 1fr;
    }
    
    .mecze-widget-match:last-child {
        grid-column: span 1;
        max-width: 100%;
    }
    
    .mecze-widget-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .mecze-footer-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mecze-widget-container {
        padding: 15px;
        margin: 10px 0;
    }
    
    .mecz-teams-widget {
        flex-direction: column;
        gap: 8px;
    }
    
    .team-logo-widget {
        width: 35px;
        height: 35px;
    }
    
    .mecz-countdown-time {
        font-size: 16px;
    }
    
    .mecze-widget-title h2 {
        font-size: 20px;
    }
}

/* ==========================================================================
   Frontend zawodników - Design 1:1 jak na screenshocie
   ========================================================================== */

.mecze-zawodnicy-frontend {
    margin: 20px 0;
}

.mecze-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    max-width: 1400px;
    gap: 20px;
    margin: 0 auto;
}

/* Ograniczenie do maksymalnie 4 kolumn */
@media (min-width: 1400px) {
    .mecze-players-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.player-card-screenshot {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.player-card-screenshot:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.player-image-container {
    width: 100%;
    height: 240px;
    position: relative;
    overflow: hidden;
}

.player-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.player-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

.player-details {
    padding: 20px;
    position: relative;
}

.player-number {
    position: absolute;
    top: -30px;
    right: 20px;
    background: #007bff;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    border: 4px solid #ffffff;
}

.player-name {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.player-position {
    color: #007bff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-age {
    color: #6c757d;
    font-size: 14px;
    font-weight: 400;
}

/* Stan braku zawodników */
.mecze-no-players-frontend {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
}

.mecze-no-players-frontend p {
    margin: 0;
    font-size: 16px;
}

/* Responsywność */
@media (max-width: 768px) {
    .mecze-players-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
    
    .player-image-container {
        height: 200px;
    }
    
    .player-details {
        padding: 16px;
    }
    
    .player-number {
        width: 50px;
        height: 50px;
        font-size: 20px;
        top: -25px;
        right: 16px;
    }
    
    .player-name {
        font-size: 20px;
    }
    
    .player-position {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .mecze-players-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .player-image-container {
        height: 180px;
    }
    
    .player-details {
        padding: 12px;
    }
    
    .player-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
        top: -20px;
        right: 12px;
        border: 3px solid #ffffff;
    }
    
    .player-name {
        font-size: 18px;
    }
    
    .player-position {
        font-size: 14px;
    }
    
    .player-age {
        font-size: 13px;
    }
    
    .mecze-no-players-frontend {
        padding: 40px 16px;
    }
}