body {
  margin: 0;
  padding: 0;
}

/* Race Day Countdown Timer Styles */
.rdct-container {
    background: linear-gradient(to bottom right, #1e293b, #0f172a, #1e293b);
    border-radius: 8px;
    padding: 1px;
    color: #fff;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rdct-header {
    text-align: center;
    margin-bottom: 20px;
}

.rdct-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rdct-title h2 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.rdct-subtitle {
    color: #cbd5e1;
    font-size: 1rem;
    margin-top: 5px;
}

.rdct-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
}

.rdct-trophy:before {
    content: '📡';
    font-size: 20px;
}

.rdct-table-container {
    overflow-x: auto;
    border: 1px solid #334155;
    border-radius: 6px;
}

.rdct-table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(30px, 41, 59, 0.3);
}

.rdct-table th {
    background-color: rgba(51, 65, 85, 0.5);
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #334155;
}

.rdct-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #334155;
    color: #e2e8f0;
    width: auto;
    white-space: nowrap;
}

.rdct-table tbody {
    background-color: rgba(30, 41, 59, 0.3);
    transition: background-color 0.2s;
}

.rdct-table tbody tr:hover {
    background-color: rgba(51, 65, 85, 0.4);
}

.rdct-category {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rdct-category-dot {
    width: 10px;
    height: 10px;
    background-color: #eab308;
    border-radius: 50%;
}

.rdct-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rdct-countdown-clock:before {
    content: '🕒';
    font-size: 16px;
}

.rdct-timer {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 600;
}

.rdct-timer.started {
    color: #4ade80;
}

.rdct-warning {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rdct-warning-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.rdct-warning-green {
    background-color: #22c55e;
}

.rdct-warning-blue {
    background-color: #3b82f6;
}

.rdct-warning-yellow {
    background-color: #eab308;
}

.rdct-warning-orange {
    background-color: #f97316;
}

.rdct-warning-red {
    background-color: #ef4444;
}

.rdct-warning-text {
    font-weight: 600;
    color: #fff;
}

.rdct-empty-message {
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 1.1rem;
}

.rdct-empty-subtitle {
    color: #64748b;
    margin-top: 8px;
    font-size: 0.9rem;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@media only screen and (max-width: 768px) {
  .rdct-table th, .rdct-table td {
    padding: 6px 8px;
    font-size: 12px;
  }
  .rdct-column-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .rdct-column-toggle label {
    margin-right: 0;
  }
  .rdct-title h2 {
    font-size: 1rem;
  }
  .rdct-subtitle {
    font-size: 0.8rem;
  }
  .rdct-container {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .full-text {
    display: none;
  }
  .abbr-text {
    display: inline;
  }
}

@media only screen and (min-width: 769px) {
  .rdct-column-toggle {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
  }
  .rdct-column-toggle label {
    margin-right: 0;
    font-size: 16px;
  }
  .rdct-table-container {
    overflow-x: auto;
  }
  .full-text {
    display: inline;
  }
  .abbr-text {
    display: none;
  }
}

.rdct-timer.finished {
    color: #22c55e;
}

/* --- Row progress bars --- */
.rdct-row-progress {
    width: 100%;
    height: 3px;
    background: rgba(51, 65, 85, 0.4);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.rdct-row-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 1s linear;
    width: 0%;
}

.rdct-pb-live {
    background: linear-gradient(90deg, #ef4444, #f59e0b);
}

.rdct-pb-done {
    background: #475569;
}

.rdct-pb-upcoming {
    background: transparent;
}

/* ═══ Weather widget (public) ═══ */
.rdct-weather-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.rdct-weather-public {
    justify-content: center;
}

.rdct-weather-data {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #94a3b8;
}

.rdct-wx-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.rdct-wx-temp {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
}

.rdct-wx-feels {
    font-size: 0.75rem;
    color: #64748b;
}

.rdct-wx-cond {
    font-weight: 600;
    color: #cbd5e1;
}

.rdct-wx-wind {
    color: #94a3b8;
}

.rdct-wx-humid {
    color: #64748b;
}

.rdct-wx-venue {
    font-weight: 600;
    color: #38bdf8;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .rdct-weather-bar {
        padding: 8px 14px;
        gap: 8px;
    }
    .rdct-weather-data {
        gap: 8px;
        font-size: 0.8rem;
    }
    .rdct-wx-feels, .rdct-wx-humid {
        display: none;
    }
}

@keyframes flash {
    10% {
        opacity: 1;
    }
    99% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.flashing {
    animation: flash 4s infinite;
    animation-direction: normal;
}
.rdct-table {
  table-layout: fixed;
}

.rdct-table td:nth-child(1), .rdct-table td:nth-child(1) {
  width: 50px;
}

.rdct-table th:nth-child(2), .rdct-table td:nth-child(2) {
  width: 150px 
}
.rdct-Logo-column {
  width: 100px;
}

.rdct-category-column {
  width: 100px;
}

.rdct-start-time-column {
  width: 100px;
}

.rdct-finish-time-column {
  width: 100px;
}

.rdct-countdown-column {
  width: 200px;
}

.rdct-warning-status-column {
  width: 200px;
}

.rdct-date-column {
  width: 100px;
}

/* --- Row colour coding by category type --- */
.rdct-table tbody tr.rdct-row-race {
    border-left: 3px solid #3b82f6;
}

.rdct-table tbody tr.rdct-row-satellite {
    border-left: 3px solid #f59e0b;
}

.rdct-table tbody tr.rdct-row-operational {
    border-left: 3px solid #64748b;
}

.rdct-table tbody tr.rdct-row-break {
    border-left: 3px solid #22c55e;
}

/* --- Notes subtitle under category name --- */
.rdct-notes-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
    font-style: italic;
    white-space: normal;
    line-height: 1.3;
}

/* ═══ Visual Timeline (public) ═══ */
.rdct-timeline {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 16px 8px 16px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.rdct-timeline-public {
    margin-top: 8px;
}

.rdct-tl-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.rdct-tl-btn {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid #475569;
    color: #cbd5e1;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: inherit;
    padding: 0;
    line-height: 1;
}

.rdct-tl-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #fff;
}

.rdct-tl-btn-fit {
    width: auto;
    padding: 0 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.rdct-tl-zoom-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    min-width: 28px;
    text-align: center;
}

.rdct-tl-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #475569 transparent;
}

.rdct-tl-scroll::-webkit-scrollbar {
    height: 6px;
}

.rdct-tl-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.rdct-tl-scroll::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.rdct-tl-inner {
    position: relative;
    min-width: 100%;
}

.rdct-tl-labels {
    position: relative;
    height: 18px;
    margin-bottom: 4px;
}

.rdct-tl-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
}

.rdct-tl-gridline {
    position: absolute;
    top: 18px;
    width: 1px;
    height: calc(100%);
    background: rgba(51, 65, 85, 0.4);
    pointer-events: none;
}

.rdct-tl-track {
    position: relative;
    height: 36px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
    overflow: visible;
}

.rdct-tl-block {
    position: absolute;
    top: 3px;
    height: 30px;
    border-radius: 3px;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
    overflow: hidden;
    opacity: 0.85;
    z-index: 2;
}

.rdct-tl-block:hover {
    opacity: 1;
    filter: brightness(1.2);
    transform: scaleY(1.1);
    z-index: 5;
}

.rdct-tl-block-label {
    display: block;
    padding: 0 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
    line-height: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.rdct-tl-now {
    position: absolute;
    top: -2px;
    width: 2px;
    height: calc(100% + 4px);
    background: #ef4444;
    z-index: 10;
    pointer-events: none;
    transition: left 0.3s linear;
}

.rdct-tl-now::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -4px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    animation: tl-now-pulse 2s infinite;
}

.rdct-tl-now-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 700;
    color: #ef4444;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

@keyframes tl-now-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ═══ Now & Next Widget ═══ */
.rdct-now-next {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 20px;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e2e8f0;
    flex-wrap: wrap;
}

.rdct-nn-loading {
    color: #64748b;
    font-size: 0.85rem;
}

.rdct-nn-current,
.rdct-nn-next {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.rdct-nn-idle {
    opacity: 0.7;
}

.rdct-nn-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.rdct-nn-live {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    animation: nn-pulse 2s infinite;
}

.rdct-nn-badge-idle {
    background: rgba(100, 116, 139, 0.2);
    color: #64748b;
}

.rdct-nn-badge-next {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

@keyframes nn-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.rdct-nn-icon {
    flex-shrink: 0;
    display: inline-flex;
}

.rdct-nn-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
}

.rdct-nn-cd {
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: #38bdf8;
    margin-left: auto;
    white-space: nowrap;
}

.rdct-nn-current .rdct-nn-cd {
    color: #f87171;
}

.rdct-nn-divider {
    width: 1px;
    height: 28px;
    background: #334155;
    margin: 0 16px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .rdct-now-next {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .rdct-nn-divider {
        width: 100%;
        height: 1px;
        margin: 4px 0;
    }
}

/* ═══ TV Mode (public) ═══ */
.rdct-tv-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #020617 0%, #0f172a 40%, #020617 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    padding: 32px 48px;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e2e8f0;
    overflow-y: auto;
}

.rdct-tv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-shrink: 0;
}

.rdct-tv-subtitle {
    font-size: 1.6rem;
    font-weight: 300;
    color: #94a3b8;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.rdct-tv-clock {
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: 2rem;
    font-weight: 600;
    color: #38bdf8;
}

.rdct-tv-close {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid #475569;
    color: #94a3b8;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rdct-tv-close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #f87171;
}

.rdct-tv-body {
    display: flex;
    gap: 40px;
    flex: 1;
    min-height: 0;
    margin-bottom: 32px;
}

.rdct-tv-current {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rdct-tv-next {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 40px;
    border-left: 1px solid #1e293b;
}

.rdct-tv-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
}

.rdct-tv-event-name {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.1;
}

.rdct-tv-next-name {
    font-size: 2rem;
}

.rdct-tv-countdown {
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: 5rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 20px;
    line-height: 1;
}

.rdct-tv-countdown.rdct-tv-live {
    color: #f87171;
    animation: tv-pulse-text 2s infinite;
}

.rdct-tv-next-cd {
    font-size: 2.5rem;
    color: #38bdf8;
}

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

.rdct-tv-progress-wrap {
    width: 100%;
    height: 8px;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}

.rdct-tv-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b);
    border-radius: 4px;
    transition: width 1s linear;
}

.rdct-tv-times {
    font-size: 1.1rem;
    color: #94a3b8;
}

.rdct-tv-remaining {
    flex-shrink: 0;
    border-top: 1px solid #1e293b;
    padding-top: 16px;
}

.rdct-tv-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rdct-tv-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.rdct-tv-list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rdct-tv-list-name {
    color: #e2e8f0;
    font-weight: 600;
}

.rdct-tv-list-time {
    color: #64748b;
}

.rdct-tv-list-cd {
    font-family: 'Consolas', 'SF Mono', monospace;
    color: #38bdf8;
    font-weight: 600;
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .rdct-tv-overlay {
        padding: 16px 20px;
    }

    .rdct-tv-body {
        flex-direction: column;
        gap: 24px;
    }

    .rdct-tv-next {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #1e293b;
        padding-top: 20px;
    }

    .rdct-tv-event-name {
        font-size: 2rem;
    }

    .rdct-tv-countdown {
        font-size: 3rem;
    }

    .rdct-tv-next-name {
        font-size: 1.4rem;
    }

    .rdct-tv-next-cd {
        font-size: 1.8rem;
    }
}
