/**
 * Voetbalkalender Styles
 */

/* CSS Variables with fallbacks */
:root {
    --vk-color-played: #9e9e9e;
    --vk-color-today: #ff6b00;
    --vk-color-upcoming: #4caf50;
    --vk-color-live: #e53935;
    --vk-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --vk-border-radius: 8px;
    --vk-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Main Wrapper */
.vk-calendar-wrapper {
    font-family: var(--vk-font-family);
    max-width: 100%;
    margin: 0 auto;
}

/* View Toggle */
.vk-view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.vk-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: var(--vk-border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vk-toggle-btn:hover {
    border-color: var(--vk-color-today);
}

.vk-toggle-btn.active {
    background: var(--vk-color-today);
    border-color: var(--vk-color-today);
    color: #fff;
}

.vk-toggle-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Navigation */
.vk-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: var(--vk-border-radius);
}

.vk-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: var(--vk-shadow);
}

.vk-nav-btn:hover {
    background: var(--vk-color-today);
    color: #fff;
}

.vk-nav-title {
    font-size: 18px;
    font-weight: 600;
    text-transform: capitalize;
}

/* Calendar Grid */
.vk-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: #f0f0f0;
    border-radius: var(--vk-border-radius);
    padding: 4px;
}

.vk-day-header {
    padding: 10px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    background: #fff;
}

.vk-day {
    min-height: 100px;
    background: #fff;
    padding: 8px;
    position: relative;
}

.vk-day-number {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.vk-day.other-month {
    background: #fafafa;
}

.vk-day.other-month .vk-day-number {
    color: #bbb;
}

.vk-day.today {
    background: #fff8e1;
}

.vk-day.today .vk-day-number {
    background: var(--vk-color-today);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Match Items */
.vk-match {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    margin-bottom: 4px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
    color: inherit;
}

.vk-match:hover {
    background: #f0f0f0;
    transform: translateX(2px);
}

.vk-match-finished {
    border-left-color: var(--vk-color-played);
}

.vk-match-today {
    border-left-color: var(--vk-color-today);
}

.vk-match-upcoming {
    border-left-color: var(--vk-color-upcoming);
}

.vk-match-live {
    border-left-color: var(--vk-color-live);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.vk-match-teams {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vk-match-score {
    font-weight: 600;
    white-space: nowrap;
}

.vk-match-time {
    color: #666;
    font-size: 10px;
}

/* List View */
.vk-calendar-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vk-day-group {
    background: #fff;
    border-radius: var(--vk-border-radius);
    box-shadow: var(--vk-shadow);
    overflow: hidden;
}

.vk-day-group-header {
    padding: 12px 16px;
    background: #f5f5f5;
    font-weight: 600;
    text-transform: capitalize;
    border-bottom: 1px solid #e0e0e0;
}

.vk-day-group-header.is-today {
    background: var(--vk-color-today);
    color: #fff;
}

.vk-match-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.vk-match-row:last-child {
    border-bottom: none;
}

.vk-match-row:hover {
    background: #f9f9f9;
}

.vk-match-row-time {
    width: 50px;
    font-size: 14px;
    color: #666;
}

.vk-match-row-teams {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vk-match-row-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vk-team-crest {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.vk-team-name {
    font-size: 14px;
}

.vk-match-row-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.vk-match-row-score span {
    font-size: 16px;
    font-weight: 600;
}

.vk-match-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.vk-status-live {
    background: var(--vk-color-live);
    color: #fff;
}

.vk-status-finished {
    background: var(--vk-color-played);
    color: #fff;
}

/* Modal */
.vk-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vk-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.vk-modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--vk-border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.vk-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.2s ease;
}

.vk-modal-close:hover {
    background: #e0e0e0;
}

.vk-modal-body {
    padding: 24px;
}

/* Match Preview */
.vk-preview-header {
    text-align: center;
    margin-bottom: 24px;
}

.vk-preview-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    text-transform: capitalize;
}

.vk-preview-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

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

.vk-preview-crest {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.vk-preview-team-name {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.vk-preview-position {
    font-size: 12px;
    color: #666;
}

.vk-preview-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.vk-preview-score {
    font-size: 32px;
    font-weight: 700;
}

.vk-preview-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--vk-color-upcoming);
}

/* Sections */
.vk-preview-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.vk-preview-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 12px;
}

/* Prediction */
.vk-prediction {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--vk-border-radius);
    padding: 20px;
    color: #fff;
}

.vk-prediction-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.vk-prediction-analyse {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    opacity: 0.95;
}

.vk-prediction-odds {
    display: flex;
    gap: 12px;
}

.vk-prediction-odd {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.vk-prediction-odd-label {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 4px;
}

.vk-prediction-odd-value {
    font-size: 24px;
    font-weight: 700;
}

/* Head to Head */
.vk-h2h-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vk-h2h-match {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 13px;
}

.vk-h2h-date {
    width: 80px;
    color: #666;
}

.vk-h2h-teams {
    flex: 1;
}

.vk-h2h-score {
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* Loading */
.vk-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.vk-loading::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--vk-color-today);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

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

/* Error */
.vk-error {
    padding: 16px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: var(--vk-border-radius);
    color: #c62828;
    text-align: center;
}

/* No Matches */
.vk-no-matches {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .vk-calendar-grid {
        font-size: 12px;
    }

    .vk-day {
        min-height: 80px;
        padding: 4px;
    }

    .vk-day-number {
        font-size: 12px;
    }

    .vk-match {
        font-size: 10px;
        padding: 2px 4px;
    }

    .vk-match-teams {
        display: none;
    }

    .vk-preview-teams {
        flex-direction: column;
        gap: 16px;
    }

    .vk-preview-vs {
        order: -1;
    }

    .vk-prediction-odds {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .vk-day-header {
        font-size: 10px;
        padding: 6px 2px;
    }

    .vk-day {
        min-height: 60px;
    }

    .vk-match-score {
        font-size: 10px;
    }
}

/* ========================================
   Match Page Styles
   ======================================== */

.vk-match-page {
    font-family: var(--vk-font-family);
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.vk-match-page-container {
    background: #fff;
    border-radius: var(--vk-border-radius);
    box-shadow: var(--vk-shadow);
    padding: 24px;
}

/* Breadcrumb */
.vk-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.vk-breadcrumb a {
    color: var(--vk-color-today);
    text-decoration: none;
}

.vk-breadcrumb a:hover {
    text-decoration: underline;
}

/* Match Header */
.vk-match-page-header {
    text-align: center;
    margin-bottom: 32px;
}

.vk-match-page-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    text-transform: capitalize;
}

.vk-matchday {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
}

.vk-match-page-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}

.vk-match-page-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 200px;
}

.vk-match-page-crest {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.vk-match-page-team-name {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

.vk-match-page-position {
    font-size: 13px;
    color: #666;
}

.vk-match-page-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 100px;
}

.vk-match-page-score {
    font-size: 36px;
    font-weight: 700;
}

.vk-match-page-ft {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.vk-match-page-time {
    font-size: 24px;
    font-weight: 600;
    color: var(--vk-color-upcoming);
}

.vk-match-page-kickoff {
    font-size: 12px;
    color: #666;
}

.vk-match-page-venue {
    font-size: 14px;
    color: #666;
}

/* Match Page Sections */
.vk-match-page-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.vk-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #333;
}

/* Match Report */
.vk-report {
    background: #f9f9f9;
    border-radius: var(--vk-border-radius);
    padding: 24px;
}

.vk-report-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
}

.vk-report-content {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

/* Standings Table */
.vk-standings-table {
    overflow-x: auto;
}

.vk-standings-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.vk-standings-table th,
.vk-standings-table td {
    padding: 12px 8px;
    text-align: center;
}

.vk-standings-table th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

.vk-standings-table th:first-child,
.vk-standings-table td:first-child {
    text-align: left;
}

.vk-standings-table tr:not(:last-child) td {
    border-bottom: 1px solid #f0f0f0;
}

.vk-standings-table .vk-win {
    color: #4caf50;
    font-weight: 600;
}

.vk-standings-table .vk-loss {
    color: #e53935;
}

.vk-standings-table .vk-points {
    font-weight: 700;
}

/* Match Events (Goals & Cards) */
.vk-events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vk-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 14px;
}

.vk-event-minute {
    min-width: 35px;
    font-weight: 600;
    color: #666;
}

.vk-event-icon {
    font-size: 16px;
}

.vk-event-player {
    font-weight: 600;
    color: #333;
}

.vk-event-assist {
    color: #666;
    font-size: 13px;
}

.vk-event-type {
    color: #888;
    font-size: 12px;
    font-style: italic;
}

.vk-event-team {
    margin-left: auto;
    color: #666;
    font-size: 13px;
}

.vk-event-goal {
    border-left: 3px solid #4caf50;
}

.vk-event-card {
    border-left: 3px solid #ffc107;
}

.vk-event-card .vk-card-red {
    color: #e53935;
}

.vk-event-card .vk-card-yellow {
    color: #ffc107;
}

/* SEO Prediction Article */
.vk-prediction-article {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.vk-prediction-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 24px 0;
    color: #1a1a1a;
}

.vk-prediction-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.vk-prediction-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 28px 0 16px 0;
    color: #1a1a1a;
}

.vk-prediction-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    color: #333;
}

.vk-prediction-content p {
    margin: 0 0 16px 0;
}

.vk-prediction-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--vk-border-radius);
    padding: 24px;
    margin-top: 32px;
    color: #fff;
}

.vk-prediction-box-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vk-prediction-extra {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.vk-prediction-extra-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vk-prediction-extra-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
}

.vk-prediction-extra-value {
    font-size: 18px;
    font-weight: 600;
}

/* Match Page Responsive */
@media (max-width: 600px) {
    .vk-match-page {
        padding: 10px;
    }

    .vk-match-page-container {
        padding: 16px;
    }

    .vk-match-page-teams {
        gap: 16px;
    }

    .vk-match-page-crest {
        width: 60px;
        height: 60px;
    }

    .vk-match-page-team-name {
        font-size: 14px;
    }

    .vk-match-page-score {
        font-size: 28px;
    }

    .vk-match-page-time {
        font-size: 20px;
    }

    .vk-prediction-odds {
        flex-direction: column;
    }
}

/* ========================================================================
   Standalone: weekoverzicht & competitiepagina
   ======================================================================== */

.vk-week, .vk-competition { margin-top: 8px; }

/* Navigatie werkt ook als links (<a>) */
a.vk-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 40px;
}

/* Datumgroepen */
.vk-date-group { margin-bottom: 28px; }
.vk-date-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ececec;
}
.vk-date-heading.is-today { color: var(--vk-color-today); }
.vk-today-badge {
    font-size: 11px;
    background: var(--vk-color-today);
    color: #fff;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 700;
}

/* Competitiegroep (kaart) */
.vk-comp-group {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}
.vk-comp-header {
    background: #fafafa;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #777;
    border-bottom: 1px solid #efefef;
}

/* Competitiepagina */
.vk-comp-title { font-size: 26px; margin: 4px 0 20px; }
.vk-comp-columns {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}
.vk-comp-main { min-width: 0; }
.vk-comp-side { position: sticky; top: 12px; }
.vk-standings-team { display: flex; align-items: center; gap: 8px; }
.vk-standings-team .vk-team-crest { width: 18px; height: 18px; object-fit: contain; }

@media (max-width: 760px) {
    .vk-comp-columns { grid-template-columns: 1fr; }
    .vk-comp-side { position: static; }
}
