/* Custom styles for Weather Monitoring System */

/* Global styles */
body {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Map container */
#map {
    height: 600px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
}

/* Weather data display */
.weather-display {
    max-height: 600px;
    overflow-y: auto;
}

.info-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.info-grid > div {
    padding: 5px;
}

/* WBGT Level badges */
.wbgt-badge {
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: bold;
    color: white;
}

.wbgt-level-安全 {
    background-color: #28a745;
}

.wbgt-level-注意 {
    background-color: #ffc107;
    color: #000;
}

.wbgt-level-警戒 {
    background-color: #ff9800;
}

.wbgt-level-厳重警戒 {
    background-color: #ff5722;
}

.wbgt-level-危険 {
    background-color: #f44336;
}

/* Default style for unknown levels */
.wbgt-level-None,
.wbgt-level- {
    background-color: #6c757d;
}

/* JMA Warning badges */
.warning-badge {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    border-radius: 3px;
    font-size: 0.875rem;
}

.warning-type-警報 {
    background-color: #dc3545;
    color: white;
}

.warning-type-注意報 {
    background-color: #ffc107;
    color: #000;
}

/* Dashboard cards */
.stat-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Location cards */
.location-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.location-card:hover {
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.location-card .location-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.location-card .location-coords {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Alert condition form */
.alert-condition-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    color: white;
    font-size: 3rem;
}

/* Responsive tables */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
}