/* Rivers Project - River Detail Page Styles */
/* Breadcrumbs, river header, current level cards, advisory sections, chart container */

/* Loading message for notes section */
.note-loading {
    padding: 20px;
    color: #7f8c8d;
}

.river-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e8ed;
}

.river-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.river-title h2 {
    margin: 0;
    color: #2c3e50;
}

.river-title .star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 4px;
    transition: transform 0.2s;
}

.river-title .star-btn:hover:not(:disabled) {
    transform: scale(1.2);
}

.river-title .star-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.river-title .star-icon {
    display: inline-block;
}

.river-title .star-icon.favorited {
    color: #f39c12;
}

.river-title .star-icon:not(.favorited) {
    color: #dfe6e9;
}

.river-title .star-icon.disabled {
    color: #bdc3c7;
    cursor: not-allowed;
}

.site-name {
    color: #7f8c8d;
    font-size: 16px;
    margin: 5px 0;
}

.river-info-row {
    margin: 12px 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.info-items-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.info-item {
    font-size: 14px;
    color: #34495e;
}

.info-item strong {
    color: #7f8c8d;
    font-weight: 600;
    margin-right: 4px;
}

.info-item.difficulty {
    background: #3498db;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.info-item.difficulty strong {
    color: white;
}

.info-item.site-code-item {
    font-family: 'Courier New', monospace;
    color: #95a5a6;
    font-size: 13px;
}

.site-code {
    color: #95a5a6;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    margin: 5px 0;
}

.aw-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.aw-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1.5px solid #3498db;
    color: #3498db;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.aw-link:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.aw-link svg {
    flex-shrink: 0;
}

/* Compact level status above chart */
.compact-level-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.level-display-compact {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.level-display-compact .value {
    font-size: 30px;
    font-weight: 700;
    color: #2c3e50;
}

.level-display-compact .unit {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

.status-indicator {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.status-good {
    background: #d4edda;
    color: #155724;
}

.status-indicator.status-low {
    background: #fff3cd;
    color: #856404;
}

.status-indicator.status-high {
    background: #f8d7da;
    color: #721c24;
}

.level-timestamp {
    margin-left: auto;
    color: #95a5a6;
    font-size: 12px;
}

/* Advisory details below chart */
.advisory-details {
    margin-top: 15px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    text-align: center;
}

.advisory-message-inline {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.advisory-message-inline.good {
    color: #155724;
}

.advisory-message-inline.low {
    color: #856404;
}

.advisory-message-inline.high {
    color: #721c24;
}

.chart-section {
    margin-bottom: 40px;
}

.chart-section h3 {
    margin-bottom: 15px;
    color: #34495e;
}

.chart-container {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    height: 400px;
}

/* When there's no compact level status, use normal border radius */
.chart-section:not(:has(.compact-level-status)) .chart-container {
    border-radius: 8px;
}

.chart-info {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-meta-left p {
    margin: 0;
    font-size: 13px;
    color: #95a5a6;
}

.chart-meta-right {
    font-size: 13px;
}

.advisory-range-inline {
    color: #34495e;
}

.advisory-range-inline strong {
    color: #2c3e50;
}

.no-data-section {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.no-data-section h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.no-data-section p {
    color: #95a5a6;
    margin: 10px 0;
}

.badge-success {
    background: #27ae60;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .river-detail-header {
        margin-bottom: 20px;
    }

    .river-title h2 {
        font-size: 22px;
    }

    .site-name {
        font-size: 14px;
    }

    .info-item {
        font-size: 13px;
    }

    .aw-links {
        width: 100%;
    }

    .aw-link {
        flex: 1;
        justify-content: center;
        font-size: 13px;
        padding: 6px 10px;
    }

    /* Make chart section full-width on mobile */
    .chart-section {
        margin-left: -15px;
        margin-right: -15px;
        margin-bottom: 20px;
    }

    .compact-level-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 15px;
        border-radius: 0;
    }

    .level-display-compact .value {
        font-size: 28px;
    }

    .level-display-compact .unit {
        font-size: 14px;
    }

    .level-timestamp {
        margin-left: 0;
        font-size: 12px;
    }

    .chart-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 15px 10px;
        height: 300px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .chart-container canvas {
        max-width: 100% !important;
        width: 100% !important;
    }

    .chart-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 0 15px;
    }

    .chart-meta-left p {
        font-size: 12px;
    }

    .chart-meta-right {
        font-size: 12px;
    }

    .no-data-section {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 30px 15px;
    }
}
