/**
 * Common styles for Windsurfer Tracker WebUI
 */

/* Event description modal - shared by event.html and review.html */
.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
}

.event-modal-overlay.visible {
    display: flex;
}

.event-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.event-modal-header {
    padding: 16px 20px;
    background: #2196F3;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.event-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.event-modal-close:hover {
    opacity: 1;
}

.event-edit-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: auto;
    margin-right: 10px;
}

.event-edit-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.8);
}

.event-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.event-modal-body p {
    margin: 0;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.event-modal-body a {
    color: #1976D2;
    text-decoration: none;
}

.event-modal-body a:hover {
    text-decoration: underline;
}

.event-modal-footer {
    padding: 12px 20px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.event-modal-footer a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.event-modal-footer a:hover {
    color: #333;
}

/* Graph panel - shared styles for review.html graph panels */
.graph-panel {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 300px;
    height: 150px;
    background: #1a252f;
    border-top: 1px solid #34495e;
    display: none;
}

.graph-panel.visible {
    display: block;
}

.graph-resize {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    background: linear-gradient(to bottom, #34495e, transparent);
    z-index: 10;
}

.graph-resize:hover,
.graph-resize.dragging {
    background: linear-gradient(to bottom, #3498db, transparent);
}

.graph-resize::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #5a6a7a;
    border-radius: 2px;
}

.graph-resize:hover::after,
.graph-resize.dragging::after {
    background: #7a8a9a;
}

.graph-container {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 10px 50px 25px 50px;
}

.graph-canvas {
    width: 100%;
    height: 100%;
    background: #2c3e50;
    border-radius: 4px;
}

.graph-title {
    position: absolute;
    top: 5px;
    left: 60px;
    color: #bdc3c7;
    font-size: 12px;
    font-weight: bold;
}

.graph-y-axis {
    position: absolute;
    left: 10px;
    top: 10px;
    bottom: 25px;
    width: 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    color: #7f8c8d;
    font-size: 11px;
}

.graph-x-axis {
    position: absolute;
    bottom: 5px;
    left: 50px;
    right: 50px;
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 11px;
}
