/* ========================================
   ORIENTEERING CLUB COLOR SCHEME
   Primary: #eb6d1e (Orange)
   Background: #ebebeb (Light Gray)
   Cards: #f5f5f5 (Lighter Gray)
   Text: Black
   ======================================== */

/* === GLOBAL STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #ebebeb;
    margin: 0;
    padding: 20px;
    color: #333;
}

h1, h2, h3 {
    color: #333;
}

a {
    color: #eb6d1e;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: #d45d19;
    text-decoration: underline;
}

/* === BUTTONS === */
button {
    padding: 10px 20px;
    background-color: #eb6d1e;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #d45d19;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* === INPUTS === */
input, select, textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #eb6d1e;
}

/* === FLASH MESSAGES === */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* === CARDS === */
.card {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* === TABLES === */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #f5f5f5;
}

th {
    background-color: #eb6d1e;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: #e8e8e8;
}

/* === STATUS BADGES === */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.status-badge.finished,
.status.finished {
    background-color: #ffe8dc;
    color: #bf360c;
}

.status-badge.in-progress,
.status.started {
    background-color: #fff3e0;
    color: #e65100;
}

.status-badge.not-started,
.status.not-started {
    background-color: #f5f5f5;
    color: #616161;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #f5f5f5;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #eb6d1e;
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: white;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: opacity 0.2s;
}

.close:hover {
    opacity: 0.8;
}

/* === ACTION BUTTONS === */
.edit-btn {
    padding: 5px 10px;
    background-color: #ffc107;
    color: #000;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
}

.edit-btn:hover {
    background-color: #ffb300;
}

.delete-btn {
    padding: 5px 10px;
    background-color: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
}

.delete-btn:hover {
    background-color: #c82333;
}

.view-btn {
    padding: 5px 10px;
    background-color: #2196f3;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
}

.view-btn:hover {
    background-color: #0b7dda;
}

.actions {
    display: flex;
    gap: 5px;
}

/* === PROGRESS BAR === */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #eb6d1e 0%, #ff9800 100%);
    transition: width 0.3s ease;
}

/* === UTILITY CLASSES === */
.text-center {
    text-align: center;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* === LAP TIMES DISPLAY === */
.lap-times-container {
    margin-top: 20px;
}

.lap-time-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background-color: white;
}

.lap-time-item:hover {
    background-color: #fafafa;
}

.lap-number {
    font-weight: bold;
    color: #eb6d1e;
    min-width: 80px;
}

.lap-timestamp {
    font-family: 'Courier New', monospace;
    color: #333;
}

.lap-split {
    font-family: 'Courier New', monospace;
    color: #666;
    min-width: 100px;
    text-align: right;
}

.lap-difference {
    color: #999;
    font-size: 0.9em;
    font-style: italic;
}

.racer-summary {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.racer-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}
