/**
 * VCR User Schedule Shortcode Styles
 * Compact Card + Modal Design
 */

/* ========================================
   COMPACT CARD - Fixed background for readability
   ======================================== */
.vcr-schedule-card {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #1e2130 !important;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border: 1px solid #3a3f5c !important;
    overflow: hidden;
    max-width: 320px;
    color: #fff !important;
}

.vcr-schedule-card * {
    color: inherit;
}

.vcr-schedule-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff !important;
}

.vcr-schedule-card-icon {
    font-size: 18px;
}

.vcr-schedule-card-title {
    font-weight: 600;
    font-size: 14px;
    flex: 1;
}

.vcr-schedule-card-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.vcr-schedule-card-body {
    padding: 8px 0;
}

.vcr-schedule-card-empty {
    padding: 24px 16px;
    text-align: center;
    color: #aaa !important;
    font-size: 13px;
}

.vcr-schedule-card-empty a {
    color: #5eb3e4 !important;
    text-decoration: none;
}

.vcr-schedule-card-empty a:hover {
    text-decoration: underline;
}

/* Card Item */
.vcr-schedule-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #2d2d44;
    transition: background 0.2s;
}

.vcr-schedule-card-item:last-child {
    border-bottom: none;
}

.vcr-schedule-card-item:hover {
    background: #252540;
}

.vcr-schedule-card-item.is-today {
    background: #1a3a2a;
}

.vcr-schedule-card-item-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
    padding: 4px 8px;
    background: #2d2d44 !important;
    border-radius: 6px;
    color: #fff !important;
}

.vcr-schedule-card-item.is-today .vcr-schedule-card-item-date {
    background: #00a32a;
    color: #fff;
}

.vcr-card-day {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.vcr-card-month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
}

.vcr-schedule-card-item-info {
    flex: 1;
    min-width: 0;
}

.vcr-card-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.vcr-session-badge-sm {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.vcr-session-badge-sm.session-FP1,
.vcr-session-badge-sm.session-FP2,
.vcr-session-badge-sm.session-FP3 { background: #17a2b8; }
.vcr-session-badge-sm.session-Q1 { background: #ffc107; color: #000; }
.vcr-session-badge-sm.session-Q2 { background: #fd7e14; }
.vcr-session-badge-sm.session-R1,
.vcr-session-badge-sm.session-R2 { background: #dc3545; }

.vcr-card-time {
    font-size: 12px;
    font-weight: 600;
    color: #aaa !important;
    font-family: 'SF Mono', Monaco, monospace;
}

.vcr-card-item-race {
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcr-card-item-track {
    font-size: 11px;
    color: #aaa !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcr-flag-sm {
    font-size: 12px;
    margin-right: 2px;
}

/* Card Footer */
.vcr-schedule-card-footer {
    padding: 8px 16px 12px;
    border-top: 1px solid #2d2d44;
}

.vcr-schedule-view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vcr-schedule-view-all-btn:hover {
    background: linear-gradient(135deg, #005a87, #004066);
    transform: translateY(-1px);
}

/* ========================================
   MODAL
   ======================================== */
.vcr-schedule-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vcr-schedule-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.vcr-schedule-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vcr-schedule-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
}

.vcr-schedule-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.vcr-schedule-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.vcr-schedule-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.vcr-schedule-modal-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #f9f9f9;
}

.vcr-schedule-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* ========================================
   SHARED STYLES (Modal content)
   ======================================== */

/* View Toggle */
.vcr-view-toggle {
    display: flex;
    gap: 2px;
    background: #f0f0f0;
    border-radius: 6px;
    padding: 2px;
}

.vcr-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.vcr-view-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.vcr-view-btn.active {
    background: #0073aa;
    color: #fff;
}

/* Navigation */
.vcr-schedule-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vcr-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.vcr-nav-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

.vcr-schedule-period-label {
    font-weight: 600;
    min-width: 180px;
    text-align: center;
    font-size: 14px;
    color: #333;
}

/* Empty State */
.vcr-schedule-empty,
.vcr-schedule-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.vcr-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.vcr-schedule-empty h3,
.vcr-schedule-login-required h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.vcr-schedule-empty p,
.vcr-schedule-login-required p {
    margin: 0 0 20px 0;
    color: #666;
}

.vcr-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.vcr-btn-primary {
    background: #0073aa;
    color: #fff;
}

.vcr-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

/* List View */
.vcr-list-day {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.vcr-list-day.is-today {
    border-color: #00a32a;
    box-shadow: 0 0 0 2px rgba(0,163,42,0.2);
}

.vcr-list-day-header {
    background: linear-gradient(135deg, #f5f5f5, #eee);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.vcr-list-day.is-today .vcr-list-day-header {
    background: linear-gradient(135deg, #e6f4ea, #d4edda);
}

.vcr-list-day-name {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
}

.vcr-list-day-date {
    color: #666;
    font-size: 14px;
}

.vcr-badge-today {
    background: #00a32a;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.vcr-list-events {
    background: #fff;
}

.vcr-list-event {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
    transition: background 0.2s;
}

.vcr-list-event:last-child {
    border-bottom: none;
}

.vcr-list-event:hover {
    background: #f9f9f9;
}

/* List Columns */
.vcr-list-col {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vcr-list-col-time {
    min-width: 70px;
    flex-direction: column;
    align-items: flex-start;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.vcr-list-time-end {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.vcr-list-col-session {
    min-width: 60px;
}

.vcr-list-col-race {
    min-width: 180px;
    max-width: 220px;
    font-weight: 600;
}

.vcr-list-col-race a {
    color: #0073aa;
    text-decoration: none;
}

.vcr-list-col-race a:hover {
    text-decoration: underline;
}

.vcr-list-col-track {
    min-width: 150px;
    color: #666;
    font-size: 13px;
}

.vcr-list-col-game {
    display: flex;
    gap: 4px;
}

.vcr-list-col-car {
    min-width: 120px;
    color: #666;
    font-size: 13px;
}

.vcr-car-name {
    font-weight: 500;
}

/* Session Badges */
.vcr-session-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.vcr-session-badge.session-FP1,
.vcr-session-badge.session-FP2,
.vcr-session-badge.session-FP3 {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.vcr-session-badge.session-Q1 {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #000;
}

.vcr-session-badge.session-Q2 {
    background: linear-gradient(135deg, #fd7e14, #e96b02);
}

.vcr-session-badge.session-R1,
.vcr-session-badge.session-R2 {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

/* Tag Badges */
.vcr-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.vcr-tag-game {
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
}

.vcr-tag-platform {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
}

/* Grid View (Calendar) */
.vcr-calendar-grid {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.vcr-calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #0073aa;
}

.vcr-calendar-day-header {
    padding: 12px 8px;
    text-align: center;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.vcr-calendar-day-header:last-child {
    border-right: none;
}

.vcr-calendar-day-header.is-today {
    background: #00a32a;
}

.vcr-day-name {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.9;
}

.vcr-day-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-top: 2px;
}

.vcr-calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-height: 200px;
}

.vcr-calendar-day-col {
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px;
    min-height: 120px;
}

.vcr-calendar-day-col:nth-child(7n) {
    border-right: none;
}

.vcr-calendar-day-col.is-today {
    background: #f0fff4;
}

.vcr-calendar-no-events {
    color: #ccc;
    text-align: center;
    padding: 20px;
    font-size: 20px;
}

.vcr-calendar-event {
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 11px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.1s;
}

.vcr-calendar-event:hover {
    transform: scale(1.02);
}

.vcr-calendar-event.session-FP1,
.vcr-calendar-event.session-FP2,
.vcr-calendar-event.session-FP3 {
    background: #17a2b8;
}

.vcr-calendar-event.session-Q1 {
    background: #ffc107;
    color: #000;
}

.vcr-calendar-event.session-Q2 {
    background: #fd7e14;
}

.vcr-calendar-event.session-R1,
.vcr-calendar-event.session-R2 {
    background: #dc3545;
}

.vcr-event-time {
    font-weight: 700;
    margin-right: 4px;
}

.vcr-event-session {
    font-weight: 600;
}

/* Flag */
.vcr-flag {
    font-size: 14px;
    margin-right: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .vcr-user-schedule-wrap .vcr-schedule-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vcr-schedule-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .vcr-list-event {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .vcr-list-col-race,
    .vcr-list-col-track {
        min-width: 100%;
    }
    
    .vcr-calendar-body {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .vcr-calendar-header-row {
        display: none;
    }
    
    .vcr-calendar-day-col {
        border-right: none;
    }
    
    .vcr-calendar-day-col::before {
        content: attr(data-day);
        display: block;
        font-weight: 600;
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid #eee;
    }
}
