body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Wix Madefor Text', sans-serif;
}

#windy {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    font-family: 'Wix Madefor Text', sans-serif !important;
}

#windy,
#windy * {
    font-family: 'Wix Madefor Text', sans-serif !important;
}

.left-overlay-controls {
    position: fixed;
    left: 20px;
    top: 84px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border-radius: 16px;
}

/* Ensure left quick toolbar items align in a clean vertical column */
.left-overlay-controls .weather-layer-toggle-container {
    position: static !important;
    /* override global fixed positioning */
    top: auto !important;
    right: auto !important;
    left: auto !important;
    margin: 0 !important;
    /* neutralize any inline margins */
    flex-shrink: 0;
    /* prevent shrinking */
}

.left-overlay-controls .weather-layer-toggle-container.tool-quickbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
}

.left-overlay-controls .toolbar-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
}

.left-overlay-controls .toolbar-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #242c36ad;
    border-radius: 8px;
}

.left-overlay-controls .toolbar-icon:hover {
    filter: brightness(1.5);
    color: #00b894;
    transition: all 0.2s ease;
}

/* Notification badge for toolbar items */
.left-overlay-controls .toolbar-item {
    position: relative;
}

.left-overlay-controls .toolbar-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Border radius for toolbar items based on position within tool-quickbar */
.left-overlay-controls .tool-quickbar .toolbar-item:first-child .toolbar-icon {
    border-radius: 8px 8px 0 0;
}

.left-overlay-controls .tool-quickbar .toolbar-item:last-child .toolbar-icon {
    border-radius: 0 0 8px 8px;
}

.left-overlay-controls .tool-quickbar .toolbar-item:not(:first-child):not(:last-child) .toolbar-icon {
    border-radius: 0;
}

/* Add border between toolbar items */
.left-overlay-controls .tool-quickbar .toolbar-item:not(:last-child) .toolbar-icon {
    border-bottom: 1px solid #242C36;
}

/* Special case: if there's only one toolbar-item in a tool-quickbar, keep full border radius */
.left-overlay-controls .tool-quickbar .toolbar-item:only-child .toolbar-icon {
    border-radius: 8px;
}

.left-overlay-controls .toolbar-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    opacity: 0.9;
}

.left-overlay-controls .weather-layer-toggle-container.tool-quickbar:hover .toolbar-icon img {
    opacity: 1;
}

/* Fix: Overlay controls container */
.overlay-controls {
    position: fixed;
    bottom: 120px;
    right: 2.5vw;
    left: auto;
    top: auto;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.control-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-button-flex-begin {
    align-self: flex-start;
    margin-right: auto;
}

.control-button-flex-end {
    align-self: flex-end;
    margin-left: auto;
}

.control-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

button.control-button:focus:not(:focus-visible) {
    outline: none;
}

button.no-outline:focus:not(:focus-visible) {
    outline: none;
}

.control-button img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Fix: Responsive overlay controls */
@media (max-width: 768px) {
    .overlay-controls {
        bottom: calc(var(--footer-height, 40px) + 30px);
        right: 2.5vw;
        left: auto;
        gap: 10px;
        top: auto;
    }

    .control-button {
        width: 50px;
        height: 50px;
    }

    .control-button img {
        width: 24px;
        height: 24px;
    }
}

/* Optional: Add a subtle overlay indicator */
.map-overlay-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

/* Footer styles for dashboard */
footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: #1A191F;
    display: block;
    z-index: 50;
}

.footer-inner {
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.footer-left {
    font-style: italic;
    font-weight: 400;
    font-size: 14px;
    color: #99A8B7;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-right a {
    font-weight: 400;
    font-size: 14px;
    color: #FFFFFF;
    text-decoration: none;
}

.footer-right a:hover {
    text-decoration: underline;
}

.footer-right span {
    color: #99A8B7;
}

@media (max-width: 768px) {
    footer {
        height: auto;
        min-height: 60px;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 8px 20px;
        gap: 4px;
        height: auto;
    }

    .footer-left {
        text-align: center;
        font-size: 12px;
    }

    .footer-right {
        text-align: center;
        font-size: 12px;
    }

    .footer-right a {
        font-size: 12px;
    }
}

.weather-modal .modal {
    padding: 0 !important;
}

.weather-modal .modal-dialog {
    position: fixed;
    top: 0;
    right: 0;
    margin: 0;
    width: 40%;
    height: 100vh;
    max-width: none;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow: visible;
    display: flex;
}

.weather-modal.in .modal-dialog {
    transform: translateX(0);
}

/* Responsive width */
@media (max-width: 768px) {
    .weather-modal .modal-dialog {
        width: 100vw;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .weather-modal .modal-dialog {
        width: 350px;
    }
}

.weather-header {
    background: white;
    padding: 20px 40px;
    position: absolute;
    flex-shrink: 0;
    top: 0;
    width: 100%;
    z-index: 206 !important;
    overflow: visible;
    border-bottom: 1px solid #E3E3E3;
}

/* Khi alert-section bị ẩn, giảm padding bottom */
.weather-header:not(:has(.alert-section:not([style*="display: none"]))) {
    padding-bottom: 15px;
}

.location-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

/* Khi notification-toggle bị ẩn, điều chỉnh layout */
.location-info:not(:has(.notification-toggle-container:not([style*="display: none"]))) {
    justify-content: flex-start;
}


.location-info:not(:has(.notification-toggle-container:not([style*="display: none"]))) .location-left {
    flex: 1;
}

.location-left {
    display: flex;
    align-items: center;
}

.location-icon {
    color: #00b894;
    margin-right: 10px;
    font-size: 16px;
}

.notification-info {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.alert-section {
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: none;
    /* Ẩn mặc định */
    text-align: center;
}

.current-weather {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(242, 249, 255, 1);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    padding: 24px;
    margin: 20px 0;
    gap: 16px;
}

.current-weather .row {
    margin-left: 10px;
}

.current-weather>div {
    flex: 1;
    min-width: 0;
}

.current-weather .temp-display {
    font-size: 32px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 8px;
    text-align: center;
}

.current-weather .weather-icon {
    font-size: 36px;
    color: #f39c12;
    margin-bottom: 35px;
}

.current-weather .weather-detail {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: rgba(46, 53, 37, 1);
    margin-bottom: 6px;
}

.current-weather .weather-detail-icon {
    color: #00b894;
    margin-right: 8px;
    font-size: 16px;
    width: 20px;
    height: 20px;
}

.current-weather .col-xs-4 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    justify-content: center;
}

.temp-display {
    font-size: 48px;
    font-weight: bold;
    color: #2d3436;
}

.weather-icon {
    font-size: 32px;
    color: #f39c12;
}

.forecast-container {
    background: white;
    border-radius: 10px;
    padding: 15px 0;
    margin: 15px 0;
    overflow-x: auto;
}

.forecast-compact {
    display: flex;
    flex-direction: row;
    gap: 14px;
    padding: 10px 0;
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    justify-content: flex-start;
    align-items: stretch;
}

.forecast-compact .forecast-day {
    background: rgba(242, 249, 255, 1);
    border-radius: 10px;
    padding: 16px 14px 16px 14px;
    width: 162px;
    min-width: 162px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    transition: box-shadow 0.2s;
    margin: 0 4px;
}

.forecast-compact .forecast-day:hover {
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.12);
    background: #e3f0fa;
}

.forecast-day-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(156, 206, 255, 1);
    font-size: 15px;
}

.forecast-day-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.weather-icon {
    font-size: 36px;
    color: #f39c12;
    width: 32px;
    height: 32px;
}

.body-detail {
    font-size: 13px !important;
    line-height: 1.2;
}

.chart-container {
    background: white;
    border-radius: 10px;
    margin: 15px 0;
}

.rain-chart {
    height: 120px;
    background: linear-gradient(to bottom, #74b9ff 0%, #0984e3 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.wind-direction {
    display: inline-block;
    /* transform: rotate(45deg); */
    font-size: 14px;
}

.warning-item {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.warning-icon {
    color: #f39c12;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.map-container {
    height: 300px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* CSS cho storm-map-wrapper và iframe-overlay */
.storm-map-wrapper {
    transition: all 0.3s ease;
    position: relative;
}

.storm-map-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.storm-map-wrapper:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.iframe-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    z-index: 10;
    background: transparent;
    transition: background-color 0.2s ease;
}

.iframe-overlay:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.iframe-overlay:active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Thêm hiệu ứng loading cho iframe */
.iframe-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
    opacity: 0.7;
}

.iframe-container iframe[src]~.iframe-container::before {
    display: none;
}

/* Ẩn loading spinner khi iframe đã load */
.iframe-container.loaded::before {
    display: none;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #214730;
    margin-bottom: 15px;
}

.weather-detail {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-size: 13px;
}

.weather-detail-icon {
    color: #00b894;
    margin-right: 8px;
    width: 16px;
    font-size: 14px;
}

.weather-modal .modal-body {
    padding: 20px 40px 20px 40px;
    flex: 1;
    overflow-x: visible;
    overflow-y: scroll;
    margin-top: 80px;
}

.storm-modal .modal-body {
    flex: 1;
    overflow-x: visible;
    overflow-y: scroll;
    /*margin-top: 10rem;*/
}

/* Limit full-height modal content styling to storm/weather sidebars only */
.weather-modal .modal-content,
.storm-modal .modal-content {
    height: 100%;
    width: 100%;
    border-radius: 0;
    border: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.2);
    background: white;
}

/* Animation keyframes */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Compact forecast for smaller width */
.forecast-compact {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
}

.forecast-compact .forecast-day {
    min-width: 15%;
    flex-shrink: 0;
}

/* Right-aligned notification */
.notification-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

/* Custom Modal Styles */
.storm-modal .modal {
    padding: 0 !important;
}

.storm-modal .modal-dialog {
    position: fixed;
    top: var(--dashboard-menu-bar-height, 64px);
    right: 0;
    margin: 0;
    width: 460px;
    height: calc(100vh - var(--dashboard-menu-bar-height, 64px) - var(--footer-height, 35px));
    max-width: none;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex !important;
}

.storm-modal.in .modal-dialog {
    transform: translateX(0);
}

.leaflet-popup-content-wrapper:has(.storm-center-popup),
.leaflet-popup-tip:has(.storm-center-popup) {
    background: transparent !important;
    box-shadow: none !important;
}

/* Responsive width */
@media (max-width: 768px) {
    .storm-modal .modal-dialog {
        width: 100vw;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .storm-modal .modal-dialog {
        width: 350px;
        top: var(--dashboard-menu-bar-height, 64px);
        height: calc(100vh - var(--dashboard-menu-bar-height, 64px) - var(--footer-height, 35px));
    }

    .weather-modal .modal-dialog {
        width: 100vw;
    }

    /* .storm-header .close-btn {
       position: unset !important; /* Fixed offset from modal's top edge */
    /* } */

    /* .weather-header .close-btn {
        position: unset !important;/* Fixed offset from modal's top edge */
    /* } */
}

.storm-header {
    background: white;
    padding: 25px 20px 20px 20px;
    position: relative;
    border-bottom: 1px solid #e9ecef;
}

.storm-title {
    font-size: 24px;
    font-weight: bold;
    color: #2d5016;
    margin: 0.5rem 2rem;
}

.storm-subtitle {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

/* Fix: Specific positioning for weather modal close button */
.weather-modal .close-btn {
    position: absolute;
    /* Changed from fixed to absolute */
    left: -25px;
    /* Fixed offset from modal's right edge */
    top: 10px;
    /* Fixed offset from modal's top edge */
    background: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    width: 3.5rem;
    height: 3.5rem;
    z-index: 9999;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}


/* Fix: Storm modal close button positioning */
.storm-modal .close-btn {
    position: absolute;
    /* Changed from fixed to absolute */
    left: -25px;
    /* Fixed offset from modal's right edge */
    top: 10px;
    /* Fixed offset from modal's top edge */
    background: white;
    border: none;
    color: dimgrey;
    font-size: 20px;
    cursor: pointer;
    width: 3.5rem;
    height: 3.5rem;
    z-index: 9999;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}



.close-btn:active {
    transform: scale(0.95);
}

.storm-card {
    background: white;
    /* Remove border here */
    border-radius: 12px;
    margin: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    /* No border by default */
    transition: all 0.3s ease;
}

.storm-card.expanded {
    border: 2px solid #28a745;
    /* Green border when expanded */
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.2);
    /* Enhanced shadow for expanded state */
}

.storm-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: #F2F9FF;
    padding: 12px;
    border-radius: 12px;
}

.storm-card.expanded .storm-info-header {
    background: #FFFFFF;
}

.storm-level-icon {
    width: 24px;
    height: 24px;

}

.storm-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.storm-name {
    font-size: 20px;
    font-weight: bold;
    color: #2d3436;
    margin: 0;
}

.storm-type {
    font-size: 14px;
    margin: 2px 0 0 0;
    transition: all 0.3s ease;
}

.weather-metrics-selected {
    overflow-x: hidden;
    background: #F2F9FF;
}

.weather-metrics-selected .metric-item {
    border: 1px solid #E0EBF5;
}

.weather-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    border-radius: 12px;
}

.metric-item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 10px;
    border-radius: 12px;
}

.metric-item {
    width: 100%;
    box-sizing: border-box;
    margin: 12px 0 0 0;
    background: #FFFFFF;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.metric-label,
.metric-value {
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

.metric-item-update-time {
    padding: 12px;
    display: flex;
    align-items: left;
    /* white-space: nowrap; */
}

.metric-icon {
    color: #28a745;
    font-size: 16px;
    margin-right: 8px;
    width: 20px;
}

.metric-content {
    flex: 1;
    text-overflow: clip;
}

.metric-label {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 2px 0;
}

.metric-value {
    font-size: 16px;
    font-weight: bold;
    color: #2d3436;
    margin: 0;
    max-width: 100%;
}

.update-time {
    text-align: left;
    font-size: 16px;
    color: #6c757d;
}

.storm-center-card {
    background: white;
    border-radius: 12px;
    margin: 0 20px 20px 20px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.center-title {
    font-size: 18px;
    font-weight: bold;
    color: #2d3436;
    margin: 0;
}

.storm-level {
    color: #1866AF;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.storm-level-icon {
    margin-right: 4px;
    font-size: 10px;
}

.center-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.center-metric {
    display: flex;
    align-items: center;
}

.center-metric-icon {
    color: #28a745;
    font-size: 14px;
    margin-right: 8px;
    width: 18px;
}

.center-metric-content {
    flex: 1;
}

.center-metric-label {
    font-size: 11px;
    color: #6c757d;
    margin: 0 0 1px 0;
}

.center-metric-value {
    font-size: 14px;
    font-weight: bold;
    color: #2d3436;
    margin: 0;
}

.last-update {
    text-align: center;
    font-size: 11px;
    color: #6c757d;
    margin-top: 10px;
}

/* Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.storm-icon {
    animation: pulse 3s infinite;
}

.storm-card.expanded .storm-icon {
    animation: fadeInScale 0.3s ease-out, pulse 3s infinite 0.3s;
}

/* Target the custom popup */
.custom-storm-icon {
    background: transparent !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style the button inside the icon */
.custom-storm-icon .control-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Ensure the image fits within the circular icon */
.custom-storm-icon .control-button img {
    display: block;
    width: 100%;
    height: auto;
}

/* Weather Timeline Styles */
.weather-timeline {
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    bottom: 40px;
    left: 20px;
    width: calc(75% - 40px);
    max-width: calc(75% - 40px);
    z-index: 201;
}

.timeline-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.play-button {
    background: white;
    border: none;
    color: #28a745;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.play-button:hover {
    color: #218838;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.play-button.playing .fa-pause {
    display: inline;
}

.timeline-progress {
    flex: 1;
    position: relative;
    padding-top: 20px;
}

.progress-bar {
    height: 6px;
    background: #00000080;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;

}

.progress-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 3px;
    width: 0;
    transition: width 0.1s ease;
}

.progress-indicator {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #f39c12;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: grab;
    user-select: none;
}

.progress-indicator:active {
    cursor: grabbing;
}

.time-indicator {
    background: #f39c12;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    position: fixed;
    top: -30px;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 500;
}

.date-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #ffffff;
    margin-top: 4px;
}

.date-label {
    text-align: left;
    white-space: nowrap;
    flex: 1;
}

.date-label.active {
    color: #ffffff;
    font-weight: 600;
}

.beaufort-scale {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 8px;
    width: 100%;
}

.beaufort-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    white-space: nowrap;
}

.beaufort-colors {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    height: 12px;
    background: linear-gradient(to right, #00f, #0ff, #0f0, #ff0, #f90, #f00, #d00);
}

.beaufort-color {
    flex: 1;
    height: 100%;
}

.beaufort-values {
    display: flex;
    margin-left: 4px;
}

.beaufort-value {
    width: 24px;
    text-align: center;
    font-size: 10px;
    color: #6c757d;
    font-weight: 500;
}

.date-label:not(:last-child) {
    border-right: 1px solid #B6B8B8;
    /* hoặc màu bạn muốn */
    /* tuỳ chỉnh khoảng cách nếu cần */
}

.current-weather-label:not(:first-child) {
    border-left: 1px dashed #B6B8B8;
    padding-left: 5px;
}

.current-weather-label .sub-title {
    font-size: 15px;
    color: #2E3525;
    font-weight: 600;
}

.weather-modal,
.storm-modal {
    z-index: 999 !important;
    pointer-events: none;
}

.weather-modal .modal-content,
.storm-modal .modal-content {
    pointer-events: auto;
}

/* Settings Sidebar Modal */
#settingsSidebarModal {
    z-index: 9997 !important;
    pointer-events: none;
}

#settingsSidebarModal .modal-content {
    pointer-events: auto;
    animation: slideInDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.storm-checking-wrapper {
    display: contents;
    /* Makes the wrapper transparent to layout */
}

.bottom-bar-container {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
    width: 100%;
    position: fixed;
    bottom: 40px;
    left: 0;
    right: 0;
    padding: 0 20px;
    z-index: 200;
}

.beaufort-legend {
    padding: 10px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: box-shadow 0.2s;
    position: fixed;
    bottom: 40px;
    right: 20px;
    width: calc(25% - 40px);
    max-width: calc(25% - 40px);
    z-index: 201;
}

.beaufort-legend img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(44, 62, 80, 0.10));
}

.accumulations-bar {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    position: fixed;
    bottom: 40px;
    left: 20px;
    width: calc(75% - 40px);
    max-width: calc(75% - 40px);
    z-index: 201;
    padding: 16px 56px;
}

.accumulation-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background-color: rgba(68, 65, 65, 0.84);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.accumulation-btn:hover {
    background-color: rgba(68, 65, 65, 0.94);
    transform: translateY(-1px);
}

.accumulation-btn:active {
    transform: translateY(0);
}

.accumulation-btn.selected,
.accumulation-btn.active {
    background-color: #d49500;
}

.accumulation-btn.selected:hover,
.accumulation-btn.active:hover {
    background-color: #e5a500;
}

/* Mobile responsive for bottom bar layout */
@media (max-width: 768px) {
    .bottom-bar-container {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }

    .weather-timeline {
        width: auto !important;
        position: fixed !important;
        bottom: 40px !important;
        left: 10px !important;
        right: auto !important;
        order: 1;
    }

    .beaufort-legend {
        width: calc(100% - 40px) !important;
        max-width: calc(100% - 40px) !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: fixed !important;
        bottom: var(--footer-height, 40px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        padding: 8px 12px;
    }

    .beaufort-legend img {
        max-width: 100% !important;
        height: auto !important;
    }

    .accumulations-bar {
        order: 1 !important;
        width: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        position: fixed !important;
        bottom: calc(var(--footer-height, 40px) + 30px) !important;
        left: 20px !important;
        transform: none !important;
        padding: 16px 5px !important;
    }

    .accumulation-btn {
        width: auto !important;
        min-width: fit-content !important;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .bottom-bar-container {
        gap: 8px;
        padding: 0 8px;
    }

    .weather-timeline {
        width: auto !important;
        position: fixed !important;
        bottom: 40px !important;
        left: 8px !important;
        right: auto !important;
        padding: 6px 12px;
    }

    .beaufort-legend {
        width: calc(100% - 40px) !important;
        max-width: calc(100% - 40px) !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: fixed !important;
        bottom: var(--footer-height, 40px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        padding: 6px 10px;
    }

    .beaufort-legend img {
        max-width: 100% !important;
        height: auto !important;
    }

    .accumulations-bar {
        order: 1 !important;
        width: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        position: fixed !important;
        bottom: calc(var(--footer-height, 40px) + 30px) !important;
        left: 20px !important;
        transform: none !important;
        padding: 10px 5px !important;
    }

    .accumulation-btn {
        width: auto !important;
        min-width: fit-content !important;
        font-size: 11px;
        padding: 6px 10px;
    }
}

.wind-direction-table {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

.wind-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    color: #2d3436;
    flex: 1;
}

.wind-arrow-img {
    width: 28px;
    height: 28px;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.wind-arrow::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid #2ecc71;
}

.wind-time {
    font-size: 14px;
    color: #636e72;
    font-weight: 500;
}

.detail {
    font-weight: bold;
}

.custom-popup {
    display: inline-flex;
    min-width: 200px;
    background: #eef7fe;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: "Open Sans", sans-serif;
    padding: 5px;
    text-align: center;
}

.popup-main {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #2c3e50;
}

.popup-icon {
    width: 24px;
    height: 24px;
}

.popup-rain-amount {
    font-size: 22px;
    font-weight: 600;
}

.popup-rain-amount .unit {
    font-size: 14px;
    font-weight: normal;
    margin-left: 2px;
}

.popup-detail {
    display: flex;
    padding-left: 4px;
    flex-direction: column;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5vh;
    gap: 4px;
}

.detail-icon {
    width: 16px;
    height: 16px;
}

.popup-forecast-link {
    margin-top: 2px;
    font-size: 12px;
    text-align: center;
}

.popup-forecast-link a {
    color: #30A849 !important;
    font-weight: 600;
    text-decoration: none;
}

#windy .leaflet-popup-content {
    margin: 13px !important;
}

.popup-forecast-link .forecast-link.loading {
    color: #f39c12 !important;
    font-weight: 600;
    text-decoration: none;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.popup-forecast-link .forecast-link.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f39c12;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* Thêm selector cụ thể hơn để đảm bảo override */
.popup-forecast-link a.forecast-link.loading {
    color: #f39c12 !important;
    font-weight: 600;
    text-decoration: none;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.popup-forecast-link a.forecast-link.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f39c12;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.popup-forecast-link .forecast-link.error {
    color: #e74c3c;
    font-weight: 600;
    text-decoration: none;
    cursor: not-allowed;
    opacity: 0.8;
    pointer-events: none;
}

.popup-forecast-link a:hover {
    text-decoration: underline;
}

.popup-pin-label {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popup-pin-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
}

.popup-location {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-shadow: 0 0 3px white;
}

.popup-temp {
    font-size: 13px;
    color: #555;
}

.popup-weather-info {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

/* Notification Toggle Styles */
.notification-toggle-container {
    border-radius: 12px;
    padding: 12px 16px;
    display: none;
    /* Ẩn mặc định */
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 16px;
    flex: 1;
}

.notification-bell-icon {
    color: #2196f3;
    font-size: 18px;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.notification-text {
    color: #3D4F62;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active {
    background: #4caf50;
    box-shadow: inset 0 2px 4px rgba(76, 175, 80, 0.3);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(24px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Animation for bell icon when notifications are enabled */
.notification-bell-icon.ringing {
    animation: bellRing 0.5s ease-in-out;
}

@keyframes bellRing {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

/* Notification popup styles */
.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 320px;
    backdrop-filter: blur(10px);
}

.notification-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.notification-popup-icon {
    font-size: 20px;
    margin-right: 10px;
}

.notification-popup-title {
    font-weight: 600;
    font-size: 14px;
}

.notification-popup-message {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.95;
}

.notification-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.notification-popup-close:hover {
    opacity: 1;
}

.wind-arrow-img-container {
    background: #F2F9FF;
    border-radius: 4.67px;
    width: 32px;
    height: 24px;
}

.rain-note {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.rain-note-text-title {
    display: flex;
    flex-direction: column;
}

.rain-note-text-title-text {
    font-weight: bold;
    font-size: 14px;
}

.rain-period-info {
    font-size: 14px;
}

.storm-warnings-row {
    display: none;
    flex-direction: row;
    gap: 16px;
    overflow-x: scroll
}

.storm-warnings-row.active {
    display: flex;
}

.map-container {
    display: none;
}

.map-container.active {
    display: block;
}

.storm-warnings-title {
    display: none;
}

.storm-warnings-title.active {
    display: block;
}

.map-title {
    display: none;
}

.map-title.active {
    margin-top: 20px;
    display: block;
}

.storm-center-popup {
    padding: 3px 7px;
    border-radius: 10px;
    text-align: center;
    min-width: 110px;
    font-family: 'Quicksand', sans-serif;
    border: 1px solid #3a3a2c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 180px;
}

.storm-center-popup-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.2;
    word-break: break-word;
}

.storm-center-popup-values {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    line-height: 1.1;
}

.storm-center-popup-divider {
    display: inline-block;
    height: 16px;
    border-left: 2px solid #3a3a2c;
    margin: 0 1px;
}

.storm-center-popup-future {
    background: rgba(242, 249, 255, 0.85);
    color: #2e3525;
    border-color: #3a3a2c;
}

.storm-center-popup-future .storm-center-popup-title,
.storm-center-popup-future .storm-center-popup-values {
    color: #2e3525;
}

.storm-center-popup-future .storm-center-popup-divider {
    border-left-color: #3a3a2c;
}

.storm-center-popup-past {
    background: rgba(69, 71, 67, 0.85);
    color: #fff;
    border-color: #3a3a2c;
}

.storm-center-popup-past .storm-center-popup-title,
.storm-center-popup-past .storm-center-popup-values {
    color: #fff;
}

.storm-center-popup-past .storm-center-popup-divider {
    border-left-color: #fff;
}

.storm-center-popup-current {
    background: rgba(242, 249, 255, 0.95);
    color: #2e3525;
    border-color: #e74c3c;
}

.storm-center-popup-current .storm-center-popup-title,
.storm-center-popup-current .storm-center-popup-values {
    color: #2e3525;
}

.storm-center-popup-current .storm-center-popup-divider {
    border-left-color: #e74c3c;
}

.leaflet-popup-content-wrapper:has(.storm-center-popup)+.leaflet-popup-tip-container,
.leaflet-popup-content-wrapper:has(.storm-center-popup)+.leaflet-popup-tip {
    display: none !important;
}

/* Khi notification-toggle-container hiển thị, tăng margin-top cho modal-body */
.weather-header:has(.notification-toggle-container.active)~.modal-body {
    margin-top: 6rem;
    /* hoặc giá trị phù hợp với chiều cao header khi có notification */
}

.notification-toggle-container.active {
    display: flex !important;
}

.storm-card-wrapper {
    overflow-y: scroll;
}

.weather-detail.wind {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.weather-detail.temperature {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.warning-summary-html::after {
    content: '...';
    position: absolute;
    right: 0;
    bottom: 0;
    background: white;
    padding-left: 10px;
}

.wind-speed-container {
    border-bottom: 1px solid rgba(227, 227, 227, 1);
    margin-bottom: 3px;
    padding: 2px;
}

.rain-chart-header {
    background: #E3F6E0;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.5rem;
    text-align: left;
    display: inline-block;
    width: 100%;
}

.storm-card-wrapper.no-storm {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow-y: hidden;
}

.marker-icon-container {
    position: relative;
    width: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.storm-icon-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.storm-icon svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    display: block;
    margin: 0 auto;
}

.rain-title-container {
    margin-left: 10px;
}

.alert-icon {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-right: 14px;
}

.alert-title {
    font-size: 18px;
}

.alert-content {
    font-size: 16px;
}

@media (max-width: 768px) {
    .alert-title {
        font-size: 15px;
    }

    .alert-content {
        font-size: 14px;
    }

    .warning-title {
        font-size: 14px !important;
    }

    .warning-summary {
        font-size: 14px !important;
    }
}

@media (max-width: 469px) {
    .weather-header .warning-detail-header {
        padding: 0;
    }
}

button::focus {
    outline: none !important;
}

button:hover {
    outline: none !important;
}

.control-button:hover {
    outline: none !important;
}

.control-button:focus {
    outline: none !important;
}

#back-to-weather-btn {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    position: absolute;
    left: 0;
    font-size: 22px;
    color: #222;
}

.warning-detail-title {
    font-weight: bold;
    font-size: 20px;
    color: #3A3A3A;
    text-align: center;
    margin-left: 5rem;
}

#warning-detail-content {
    overflow-x: hidden;
    margin: 0 auto;
}

.warning-detail-content-header .warning-detail-title {
    font-size: 20px;
    text-align: left;
    margin-left: unset;
}

.warning-detail-content-header {
    padding-bottom: 2vh;
}

/* Responsive Design */
@media (max-width: 1440px) {

    .weather-timeline {
        width: auto !important;
        position: fixed !important;
        bottom: 40px !important;
        left: 20px !important;
        right: auto !important;
        padding: 6px 8px;
        border-radius: 8px;
    }

    .timeline-container {
        flex-direction: row;
        gap: 6px;
        align-items: stretch;
    }

    .date-labels {
        font-size: 10px;
        flex-wrap: wrap;
        gap: 2px;
    }

    .progress-indicator {
        width: 10px;
        height: 10px;
    }

    .time-indicator {
        font-size: 12px;
        padding: 1px 4px;
    }
}


@media (max-width: 768px) {

    .warning-detail-title {
        margin-left: 2rem;
    }

    #warning-detail-content {
        margin: 1.2vh auto;
    }

    .storm-header .close-btn {
        left: 90vw;
        /* Adjusted for better visibility */
        top: 10px;
        background-color: transparent;
    }

    .storm-header {
        padding: 1vh;
    }

    .weather-header .close-btn {
        left: 90vw;
        /* Adjusted for better visibility */
        top: 10px;
        /* Fixed offset from modal's top edge */
    }

    .current-weather {
        flex-direction: row;
        align-items: stretch;
        padding: 16px 10px;
        gap: 16px;
    }

    .current-weather .temp-display {
        font-size: 24px;
    }

    .current-weather-label .sub-title {
        font-size: 13px;
        color: #2E3525;
        font-weight: 600;
    }

    .forecast-compact .forecast-day {
        justify-content: center;
        align-items: center;
        width: 120px;
        padding: 10px 8px;
    }

    .forecast-day-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .forecast-compact {
        gap: 6px;
    }

    .current-weather .weather-icon {
        width: 30px;
        color: #f39c12;
    }

    .weather-detail span.title {
        display: none;
    }

    .notification-content {
        flex-direction: row !important;
        margin-right: 0 !important;
        gap: 6px;
        width: 100%;
    }

    .notification-bell-icon {
        font-size: 20px !important;
        margin-right: 8px !important;
    }

    .notification-text {
        font-size: 13px !important;
        word-break: break-word;
        max-width: 100%;
    }

    .toggle-switch {
        width: 40px !important;
        height: 20px !important;
        min-width: 40px;
    }

    .toggle-slider {
        width: 16px !important;
        height: 16px !important;
        top: 2px !important;
        left: 2px !important;
    }

    .toggle-switch.active .toggle-slider {
        transform: translateX(18px) !important;
    }

    .weather-modal .modal-body {
        padding: 0px 40px 20px 40px;
        flex: 1;
        overflow-x: visible;
        overflow-y: scroll;
    }

    .weather-header:has(.notification-toggle-container.active)~.modal-body {
        margin-top: 8rem !important;
        /* hoặc giá trị phù hợp với chiều cao header khi có notification */
    }

    .storm-modal .modal-dialog {
        position: fixed;
        left: 0;
        top: 59%;
        bottom: 0;
        width: 100%;
        height: 50vh;
        min-height: 20vh;
        max-height: 90vh;
        margin: 0;
        max-width: 100%;
        transform: none !important;
        border-radius: 16px 16px 0 0;
        overflow-y: auto;
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.15);
        background: #fff;
        transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        touch-action: none;
        display: flex;
        flex-direction: column;
    }

    .storm-modal .modal-content {
        height: 100%;
        border-radius: 16px 16px 0 0;
    }

    .storm-title {
        font-size: 24px;
        font-weight: bold;
        color: #2d5016;
        margin: 0.5rem 0;
    }

    .storm-card-wrapper {
        display: flex;
        flex-direction: row;
        overflow-x: scroll;
        gap: 10px;
        margin-bottom: 1vh;
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
        padding-left: calc(50vw - 155px);
        /* Căn giữa phần tử đầu tiên */
        padding-right: calc(50vw - 155px);
        /* Căn giữa phần tử cuối cùng */
    }

    .storm-card {
        width: 311px;
        height: 200px;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        margin: 10vh 0;
        padding: 10vh 0;
        flex: 0 0 auto;
        scroll-snap-align: center;
    }

    .storm-card-wrapper.no-storm {
        display: none;
        height: min-content;
    }

    .modal-dialog.storm-modal-no-storm {
        top: 85% !important;
    }

    .storm-title {
        text-align: center;
    }

    .storm-subtitle {
        text-align: center;
    }

    .weather-metrics {
        gap: unset;
    }

    .storm-card.expanded .storm-info-header {
        margin-bottom: unset;
    }

    .storm-card.expanded .storm-card-wrapper {
        background-color: #F2F9FF;
    }

    .section-title {
        font-size: 18px;
    }

    .weather-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    #back-to-weather-btn {
        left: -4vw !important;
    }

    .modal-body#warning-detail-content {
        margin-top: 1vh;
    }

    .weather-header .location-info {
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .section-title.current-weather-title {
        padding-top: 15px;
    }

    .weather-modal .modal-body {
        margin-top: 50px !important;
    }

    .weather-header:not(:has(.alert-section:not([style*="display: none"]))) {
        padding-bottom: 0px !important;
    }

    .weather-header {
        background-color: unset;
        box-shadow: unset;
    }

    .current-weather .weather-detail {
        font-size: 14px;
    }

    .weather-header {
        padding: 20px 20px;
    }

    .notification-toggle-container {
        width: 70% !important;
        gap: 10px;
    }

    .current-weather .weather-detail .title {
        display: none;
    }

    .current-weather .weather-detail .temperature {
        display: none;
    }

    .date-label:not(:last-child) {
        border-right: 0;
        /* hoặc màu bạn muốn */
        /* tuỳ chỉnh khoảng cách nếu cần */
    }

    .current-weather-label .weather-icon {
        margin-left: 20px;
        width: 20px;
    }

    .rain-title-container {
        margin-left: 5px;
    }

    .temperature {
        flex-direction: row;
        margin: 0;
    }

    .temperature .rain-title {
        white-space: nowrap;
        font-size: 13px;
    }

    .temperature .rain .detail {
        font-size: 24px !important;
    }

    .temperature .decimal {
        margin-top: 10px !important;
    }

    .storm-warnings-row {
        flex-direction: column !important;
    }

    .storm-warnings-row .warning-item {
        min-width: 220px !important;
        font-size: 12px;
        padding: 8px 4px;
        white-space: unset !important;
        overflow-y: hidden !important;
    }

    .weather-timeline {
        width: auto !important;
        position: fixed !important;
        bottom: 40px !important;
        left: 8px !important;
        right: auto !important;
        padding: 1.5rem 0.5rem;
    }

    .control-button {
        margin-bottom: 10px;
    }

    .timeline-container {
        gap: 10px;
    }

    html,
    body {
        font-size: 12px !important;
    }

    .progress-indicator {
        width: 1rem;
        height: 1rem;
    }

    .beaufort-legend {
        position: absolute;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        margin-top: 16px;
    }

    .storm-header .close-btn {
        left: 85%;
        /* Adjusted for better visibility */
    }

    .weather-header .close-btn {
        left: 85%;
        /* Adjusted for better visibility */
        top: 10px;
        /* Fixed offset from modal's top edge */
    }

    .forecast-compact .forecast-day .forecast-day-body .body-detail {
        display: none;
    }

    .forecast-compact .forecast-day {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 75px;
    }

    .weather-modal .modal-body {
        padding: 0px 10px;
    }

    .current-weather {
        padding: 16px;
    }

    .temp-icon {
        width: 30px;
    }

    .weather-header:has(.notification-toggle-container.active)~.modal-body {
        margin-top: 10rem !important;
        /* hoặc giá trị phù hợp với chiều cao header khi có notification */
    }

    .notification-toggle-container {
        width: 100%;
    }

    .storm-modal .modal-dialog {
        top: 70%
    }

    .storm-modal .close-btn {
        top: -3%;
        background: rgb(255, 255, 255, 1);
        /* Fixed offset from modal's top edge */
    }

    .current-weather-label .weather-detail {
        margin: 10px 0 0 0;
    }

    .rain-title-container {
        margin-top: 5px;
    }

    .modal-dialog.storm-modal-no-storm {
        top: 85vh !important;
    }

    .time-indicator {
        top: -25px;
    }

    .warning-detail-title {
        margin-left: 0;
        font-size: 16px;
    }

    #back-to-weather-btn {
        left: -5vw !important;
    }
}

@media (max-width: 375px) {
    .notification-toggle-container {
        padding: 10px;
    }

    .iframe-container {
        margin-bottom: unset !important;
    }

    .map-wind-speed {
        font-size: 14px !important;
    }

    .map-wind-pressure {
        font-size: 14px !important;
    }
}

/* Performance optimizations */
.weather-modal .modal-content {
    will-change: transform;
    transform: translateZ(0);
}

.forecast-compact {
    contain: layout style paint;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Optimize DOM updates */
.weather-modal * {
    backface-visibility: hidden;
}

/* Reduce repaints */
.current-weather,
.forecast-day,
.metric-item {
    transform: translateZ(0);
}

/* Smooth transitions */
.weather-modal .modal-dialog {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optimize images */
.weather-icon,
.temp-icon,
.popup-icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduce layout thrashing */
.forecast-compact,
.wind-direction-table {
    contain: layout;
}

/* Data Source Selector Styles */
.data-source-selector {
    height: 60px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.data-source-header {
    background: #7CB342;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    text-align: center;
    line-height: 1.2;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-source-tabs {
    display: flex;
    height: 36px;
    flex: 1;
}

.data-source-tab {
    flex: 1;
    background: #242C36B2;
    border: none;
    color: #8A9CAB;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid #D0D0D0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.data-source-tab:last-child {
    border-right: none;
}

.data-source-tab:hover {
    background: #D8D8D8;
    color: #333333;
}

.data-source-tab.active {
    color: white;
    position: relative;
}

.data-source-tab.active::after {
    content: '';
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #7CB342;
    z-index: 10;
}

.data-source-tab:focus {
    outline: none;
}

/* Weather Layer Sidebar Styles */
.weather-layer-sidebar {
    position: fixed;
    top: 64px;
    right: -415px;
    width: 415px;
    height: calc(100vh - 64px);
    background: rgba(0, 0, 0, 0.9);
    z-index: 9998;
    transition: right 0.3s ease;
    backdrop-filter: blur(15px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.weather-layer-sidebar.show {
    right: 0;
}

.weather-layer-header {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.weather-layer-toggle {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.weather-layer-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.weather-layer-content {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.weather-layer-item {
    display: flex;
    align-items: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 8px;
}

.weather-layer-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.weather-layer-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateX(5px);
}

.weather-layer-icon {
    width: 80px;
    height: 50px;
    font-size: 18px;
    text-align: center;
    color: #4FC3F7;
    position: relative;
}

.weather-layer-icon .pinned-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Show/Hide classes for pinned and unpinned icons */
.pinned-icon.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.pinned-icon.hide {
    display: none !important;
}

.unpinned-icon.show {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.unpinned-icon.hide {
    display: none !important;
}

/* Unpinned icon styles */
.weather-layer-icon .unpinned-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Pinned icon styles */
.weather-layer-icon .pinned-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    cursor: pointer;
}

/* Show unpinned icon on hover when it has 'show' class and no pinned icon exists */
.weather-layer-item:hover .weather-layer-icon .unpinned-icon.show {
    opacity: 1;
    visibility: visible;
}

/* Hide unpinned icon if pinned icon exists */
.weather-layer-icon:has(.pinned-icon.show) .unpinned-icon {
    display: none !important;
}

/* Alternative fallback for browsers that don't support :has() */
.weather-layer-icon .unpinned-icon.hidden {
    display: none !important;
}

/* Ensure pinned icon is visible when it has 'show' class */
.weather-layer-icon .pinned-icon.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.weather-layer-text {
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

/* Mobile Close Button Styles */
.mobile-close-section {
    display: none;
}

.mobile-close-header {
    padding: 15px 20px !important;
    justify-content: center !important;
    background-color: transparent !important;
    border-bottom: none !important;
}

.mobile-close-header:hover {
    background-color: transparent !important;
}

.mobile-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3A3942;
    border: none;
    color: #CCCCCC;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-close-btn i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.mobile-close-btn:hover {
    background-color: #4A4952;
    color: #FFFFFF;
}

.mobile-close-btn:active {
    transform: scale(0.95);
}

/* Show mobile close button only on mobile screens */
@media (max-width: 768px) {
    .mobile-close-section {
        display: block;
    }
}

/* Weather Layer Toggle Button (when sidebar is closed) - but NOT in left toolbar */
.overlay-controls .weather-layer-toggle-container,
.weather-layer-toggle-container:not(.tool-quickbar)

/* Weather Layer Toggle Button (when sidebar is closed) */
.weather-layer-toggle-container {
    position: fixed;
    top: 84px;
    /* 64px menu bar + 20px offset */
}

/* When inside overlay-controls, keep fixed at top-right under menu bar */
.overlay-controls .weather-layer-toggle-container {
    position: fixed;
    top: 84px;
    /* 64px menu bar + 20px offset */
}

.weather-layer-toggle-btn {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 24px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Ensure icon inside toggle button is visible */
.weather-layer-toggle-btn i {
    color: #fff;
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    pointer-events: none;
}

.weather-layer-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.settings-section-header img {
    margin-right: 5px;
}

/* Mobile responsive for weather layer sidebar */
@media (max-width: 768px) {
    .weather-layer-sidebar {
        width: 100vw;
        right: -100vw;
    }

    .weather-layer-toggle-container {
        top: 84px;
        /* keep 20px below menu bar */
    }

    .weather-layer-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .weather-layer-toggle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .weather-layer-item {
        padding: 14px 20px;
        margin: 0 12px;
        margin-bottom: 6px;
    }

    .weather-layer-text {
        font-size: 15px;
    }

    .weather-layer-icon {
        font-size: 16px;
        margin-right: 14px;
    }
}

@media (max-width: 480px) {
    .weather-layer-toggle-container {
        top: 84px;
        /* keep 20px below menu bar */
    }

    .weather-layer-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .weather-layer-toggle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .weather-layer-item {
        margin-bottom: 4px;
    }

    .weather-layer-text {
        font-size: 14px;
    }

    .weather-layer-icon {
        font-size: 14px;
        margin-right: 12px;
    }
}

/* Mobile responsive for data source selector */
@media (max-width: 768px) {
    .data-source-selector {
        height: 54px;
    }

    .data-source-header {
        font-size: 11px;
        padding: 5px 10px;
        height: 22px;
    }

    .data-source-tabs {
        height: 32px;
    }

    .data-source-tab {
        font-size: 9px;
    }

    .data-source-tab.active::after {
        top: -5px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid #7CB342;
    }
}

@media (max-width: 480px) {
    .data-source-selector {
        height: 48px;
    }

    .data-source-header {
        font-size: 10px;
        padding: 4px 8px;
        height: 20px;
    }

    .data-source-tabs {
        height: 28px;
    }

    .data-source-tab {
        font-size: 8px;
    }

    .data-source-tab.active::after {
        top: -4px;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 4px solid #7CB342;
    }
}

/* Optimize scroll performance */
.weather-modal .modal-body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Loading skeleton for better UX */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Progressive loading indicators */
.progressive-loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.progressive-loading.loaded {
    opacity: 1;
    transform: translateY(0);
}


/* Error states */
.error-state {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.error-state p {
    margin: 0;
    font-size: 14px;
}

/* Retry button */
.retry-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.retry-button:hover {
    background: #218838;
}

/* Optimize chart rendering */
.highcharts-container {
    contain: layout style paint;
}

/* Reduce memory usage for large datasets */
.forecast-compact .forecast-day {
    contain: layout style;
}

/* Optimize wind direction table */
.wind-direction-table {
    contain: layout style;
}

.wind-cell {
    contain: layout style;
}

/* Performance monitoring */
.performance-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 12px;
    z-index: 9999;
    display: none;
}

.performance-indicator.show {
    display: block;
}

/* Optimize modal animations */
.weather-modal.in .modal-dialog {
    transform: translateX(0) translateZ(0);
}

/* Reduce GPU usage */
.weather-modal * {
    will-change: auto;
}

.weather-modal .modal-dialog {
    will-change: transform;
}

/* Optimize for high DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .weather-icon,
    .temp-icon,
    .popup-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduce layout shifts */
.weather-modal .modal-content {
    min-height: 100vh;
}

/* Nowcast modal content responsive */
.nowcast-modal-content {
    height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 40px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
}

.current-weather {
    min-height: 120px;
}

.forecast-compact {
    min-height: 100px;
}

/* Optimize for slow connections */
@media (prefers-reduced-motion: reduce) {

    .weather-modal .modal-dialog,
    .loading-overlay,
    .progressive-loading {
        transition: none;
        animation: none;
    }
}

@media (max-width: 768px) {
    .storm-card {
        padding: 6px 8px;
        margin: 6px 0 10vh 0;
    }

    .metric-item {
        padding: 6px 4px;
        margin: 6px 0 0 0;
        width: 150px;
        flex: 0 0 auto;
    }

    .metric-item-grid {
        padding: 0 4px;
        gap: 8px;
    }

    .metric-item-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: hidden;
        gap: 8px;
        width: 100%;
    }

    .storm-card.expanded .metric-item-grid {
        overflow-x: scroll;
    }

    .metric-item-update-time {
        display: flex;
        align-items: left;
        /* white-space: nowrap; */
    }
}

.map-overlay {
    transition: all 0.3s ease;
}

.map-overlay:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

.map-container:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.map-overlay::after {
    content: "Click để chuyển cơn bão khác";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

.map-overlay:hover::after {
    opacity: 1;
}

.rain-chart-header.rain-chart-header-first {
    width: 83%;
}

@media (max-width: 768px) {
    .storm-center-popup {
        min-width: 80px;
        max-width: 95vw;
        font-size: 12px;
        padding: 3px 3vw;
    }

    .storm-center-popup-title {
        font-size: 12px;
        word-break: break-word;
    }

    .storm-center-popup-values {
        font-size: 12px;
        gap: 4px;
    }

    .storm-center-popup-divider {
        height: 12px;
        margin: 0 3px;
    }

}

@media (max-width: 469px) {
    .storm-icon-img {
        height: 30px;
    }

    .storm-modal .modal-dialog {
        top: 70%;
        height: 40vh !important;
        min-height: 20vh;
        max-height: 60vh;
    }

    .storm-modal .modal-content {
        height: 100%;
        border-radius: 16px 16px 0 0;
        padding: 4px 0 0 0;
    }

    .storm-header {
        padding: 10px 10px 8px 10px !important;
    }

    .storm-title {
        font-size: 16px;
        margin: 0.2rem 0;
    }

    .storm-card-wrapper {
        gap: 4px;
        padding-left: 4vw;
        padding-right: 4vw;
    }

    .storm-card {
        width: 250px;
        height: 130px;
        border-radius: 8px;
        margin: 2vh 0;
    }

    .storm-info-header {
        padding: 6px 6px 0px 6px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
    }

    .storm-icon {
        height: 22px !important;
        margin-right: 4px !important;
    }

    .storm-name-container {
        margin-left: 10px;
    }

    .storm-name {
        font-size: 13px !important;
        margin: 0 !important;
    }

    .storm-type {
        font-size: 10px !important;
        margin: 1px 0 0 0 !important;
    }

    .storm-level {
        font-size: 10px !important;
        padding: 2px 4px !important;
        border-radius: 8px !important;
    }

    .storm-level-icon {
        width: 14px !important;
        height: 14px !important;
        margin-right: 2px !important;
    }

    .weather-metrics {
        gap: 4px !important;
        margin-bottom: 4px !important;
        margin-top: 5px !important;
        padding: 5px 5px 0 0 !important;
        border-radius: 8px !important;
        font-size: 11px !important;
    }

    .metric-item-grid {
        margin-left: 5px;
        margin-right: 5px;
        gap: 4px !important;
        padding: 0 2px !important;
        grid-template-columns: 1fr !important;
    }

    .metric-item {
        padding: 4px !important;
        margin: 2px 0 0 0 !important;
        font-size: 10px !important;
        border-radius: 6px !important;
        min-width: 0 !important;
        width: fit-content !important;
    }

    .metric-icon {
        width: 16px !important;
        height: 16px !important;
        margin-right: 4px !important;
        font-size: 13px !important;
    }

    .metric-content {
        font-size: 10px !important;
    }

    .metric-label {
        font-size: 10px !important;
        margin-bottom: 0 !important;
    }

    .metric-value {
        font-size: 12px !important;
        margin: 0 !important;
    }

    .metric-item-update-time {
        font-size: 10px !important;
        padding: 4px !important;
    }
}

.rotating-marker {
    animation: xoay 2s linear infinite;
}

@keyframes xoay {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }

    /* ngược chiều kim đồng hồ */
}

/* Quick Weather Layer Buttons under toggle */
.weather-layer-quickmenu {
    position: fixed;
    top: 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    padding: 0;
    /* no padding to hug icons */
    max-height: calc(60vh - 35px);
    overflow-y: auto;
    overflow-x: visible;
    /* Enable scrolling when too many items */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

/* Hide scrollbar for webkit browsers */
.weather-layer-quickmenu::-webkit-scrollbar {
    display: none;
}

/* Compact mode classes removed - now using dynamic inline styles for resizing */

.weather-quick-item {
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    /* label on the left, icon on the right */
    background: #0000001A;
    border-radius: 28px;
    padding: 0px 0px 0px 16px;
    color: #fff;
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background 0.2s ease;
    width: fit-content;
}

.weather-quick-item:hover {
    transform: translateX(-2px);
    background: #00000066;
}

.weather-quick-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    /* spacing between label and icon on the right */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    /* clip inner image to circle */
}

.weather-quick-icon i {
    color: #4FC3F7;
    font-size: 18px;
}

/* Support SVG images inside quick icon as perfect circle */
.weather-quick-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    /* fill circle */
    border-radius: 50%;
}

.weather-quick-label {
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

/* Login modal sizing */
#loginModal {
    background-color: rgba(20, 43, 20, 0.6) !important;
}

#loginModal .modal-dialog {
    max-width: 633px;
    width: 633px;
    margin: auto;
}

#loginModal .modal-content {
    border-radius: 12px;
    width: 633px;
    height: 453px;
    background: #142B1499;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

#loginModal .modal-header {
    border-bottom: none;
    padding: 32px 32px 0 32px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Compare Modal Styles */
.compare-modal {
    z-index: 9999;
}

.compare-modal-location-desc {
    margin-bottom: 0px;
}

.compare-modal .modal-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.compare-modal .modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: none;
}

/* Ensure compare modal content fits laptop screen heights and scrolls correctly */
.compare-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Compare modal main content */
.compare-modal-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Compare Modal Responsive Design */
@media (max-width: 768px) {
    .compare-modal .modal-dialog {
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
    }

    .compare-modal-header {
        padding: 16px 20px 0 20px;
    }

    .compare-modal-title h4 {
        font-size: 18px;
    }

    .compare-modal-location-desc {
        font-size: 14px;
    }

    .compare-modal .nowcast-modal-header-notification {
        margin-top: 12px;
    }

}

@media (max-width: 480px) {
    .compare-modal .modal-dialog {
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
    }

    .compare-modal-header {
        padding: 12px 16px 0 16px;
    }

    .compare-modal-title h4 {
        font-size: 16px;
    }

    .compare-modal-location-desc {
        font-size: 12px;
    }

    .compare-modal .nowcast-modal-header-notification {
        margin-top: 8px;
    }

}

@media (min-width: 768px) and (max-width: 1024px) {
    .compare-modal .modal-dialog {
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
    }

    .nowcast-modal-content {
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px));
    }
}

@media (min-width: 1024px) {
    .compare-modal .modal-dialog {
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
    }
}

.compare-modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px 30px 0 30px;
    flex-shrink: 0;
    z-index: 1000;
}

/* Compare Modal Notification Styles - Align to right */
.compare-modal .nowcast-modal-header-notification {
    display: flex;
    justify-content: flex-end;
}

.compare-modal-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
}

.compare-modal-title {
    text-align: center;
}

#loginModal .modal-header .close {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 40px;
    color: #bbc8d5;
    opacity: 0.7;
    border: 2px solid #6c757d;
    border-radius: 50%;
    background: none;
    padding: 8px;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#loginModal .modal-header .close:hover {
    opacity: 1;
    color: #495057;
    border-color: #495057;
    background-color: rgba(73, 80, 87, 0.1);
    transform: scale(1.05);
}

#loginModal .modal-title {
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-top: 5px;
    text-align: center;
    letter-spacing: 0.5px;
}

#loginModal .modal-body {
    padding: 24px 48px 32px 48px;
    flex: 1;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#loginModal .form-group {
    margin-bottom: 24px;
}

#loginModal .form-group label {
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    display: block;
}

#loginModal .form-control {
    height: 52px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    padding: 14px 20px;
    font-family: 'Wix Madefor Text', sans-serif;
    transition: all 0.3s ease;
    background: #ffffff;
}

#loginModal .form-control:focus {
    border-color: #4D459B;
    box-shadow: 0 0 0 3px rgba(77, 69, 155, 0.1);
    outline: none;
}

#loginModal .form-control::placeholder {
    color: #6c757d;
    font-weight: 400;
}

#loginModal .password-action {
    position: relative;
    display: flex;
    align-items: center;
}

#loginModal .input-group-text {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    font-size: 18px;
}

#loginModal .input-group-text:hover {
    color: #495057;
}

#loginModal .btn-login {
    width: 100%;
    height: 52px;
    background: #80B541;
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 8px;
}

#loginModal .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(77, 69, 155, 0.3);
}

#loginModal .btn-login:active {
    transform: translateY(0);
}

#loginModal .alert {
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: 'Wix Madefor Text', sans-serif;
}

/* Responsive adjustments for login modal */
@media (max-width: 768px) {
    #loginModal .modal-dialog {
        max-width: 95%;
        width: 95%;
        margin: 10px auto;
    }

    #loginModal .modal-content {
        width: 100%;
        height: auto;
        min-height: 453px;
    }

    #loginModal .modal-body {
        padding: 20px 24px 24px 24px;
    }

    #loginModal .modal-header {
        padding: 24px 24px 0 24px;
    }

    #loginModal .modal-title {
        font-size: 24px;
    }
}

/* LoginModal - Mobile landscape responsive */
@media (max-width: 1000px) and (orientation: landscape) and (max-height: 500px) {
    #loginModal .modal-dialog {
        max-width: 70%;
        width: 70%;
        margin: calc(var(--dashboard-menu-bar-height, 64px)) auto 10px auto;
    }

    #loginModal .modal-content {
        width: 100%;
        height: auto;
        min-height: 280px;
        max-height: calc(100vh - var(--dashboard-menu-bar-height, 64px) - 40px);
    }

    #loginModal .modal-header {
        padding: 12px 16px 0 16px;
    }

    #loginModal .modal-title {
        font-size: 16px;
    }

    #loginModal .modal-body {
        padding: 12px 16px 16px 16px;
    }

    #loginModal .form-group {
        margin-bottom: 12px;
    }

    #loginModal .form-control {
        height: 40px;
        font-size: 14px;
        padding: 10px 14px;
    }

    #loginModal .btn-login {
        height: 40px;
        font-size: 14px;
    }

    #loginModal .modal-header .close {
        top: 25px;
        right: 25px;
        font-size: 24px;
    }
}

.weather-quick-item.active {
    background: #00000066;
}

/* Active state: emphasize label */
.weather-quick-item.active .weather-quick-label {
    font-size: 15px;
    font-weight: 600;
}

.weather-quick-item.active .weather-quick-icon {
    width: 40px;
    height: 40px;
}

@media (max-width: 768px) {
    .weather-layer-quickmenu {
        top: 130px;
        gap: 10px;
        padding: 0;
        max-height: calc(50vh - 40px);
    }

    .weather-quick-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        margin-left: 8px;
    }

    .weather-quick-label {
        font-size: 13px;
    }

    /* Mobile responsive adjustments - dynamic sizing handled by JavaScript */
}

@media (max-width: 480px) {
    .weather-layer-quickmenu {
        top: 130px;
        gap: 8px;
        padding: 0;
        max-height: calc(50vh - 40px);
    }

    .weather-quick-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        margin-left: 6px;
    }

    .weather-quick-label {
        font-size: 12px;
    }

}

/* Settings Sidebar Modal Styles */
.settings-sidebar-dialog {
    position: fixed;
    top: var(--dashboard-menu-bar-height, 64px);
    right: 0;
    margin: 0;
    height: calc(100vh - var(--dashboard-menu-bar-height, 64px) - var(--footer-height, 35px));
    max-width: 400px;
    width: 400px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

#settingsSidebarModal.show .settings-sidebar-dialog {
    transform: translateX(0);
}

.settings-sidebar-content {
    background-color: #28272F;
    border: none;
    border-radius: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.settings-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.settings-section {
    border-bottom: 1px solid #3A3942;
}

.settings-section-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.weather-layers-section .settings-section-header {
    padding: 10px 0px 0px 20px !important;
}

.settings-section-header:hover {
    background-color: #33323A;
}

.settings-section-header i:first-child {
    color: #FFFFFF;
    font-size: 16px;
    width: 20px;
    margin-right: 12px;
}

.settings-section-title {
    color: #D3CFF5;
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 14px;
    font-weight: 400;
    flex: 1;
}

.settings-section-header .fa-chevron-right {
    color: #888888;
    font-size: 12px;
    margin-left: auto;
}

.weather-layers-section .settings-section-header {
    cursor: default;
}

.weather-layers-section .settings-section-header:hover {
    background-color: transparent;
}

.weather-layers-section .fa-chevron-right {
    display: none;
}

.weather-layers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 0 10px 10px 10px;
}

.weather-layer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    min-height: 70px;
    padding-top: 10px;
    margin-top: 10px;
}

.weather-layer-item:hover {
    background-color: #33323A;
}

.weather-layer-item.active .weather-layer-label {
    color: #B8E286;
}

.weather-layer-item.active .weather-layer-icon {
    background-color: #5A5968;
    border-radius: 6px;
    padding: 4px;
}


.weather-layer-item.active .weather-layer-icon img {
    border: 2px solid #B8E286;
    border-radius: 8px;
}

.weather-layer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: background-color 0.2s ease;
}

.weather-layer-icon img {
    display: block;
}

.weather-layer-label {
    color: #FFFFFF;
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 9px;
    font-weight: 400;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
    display: block;
}

/* Modal backdrop for settings sidebar */
#settingsSidebarModal .modal-backdrop {
    background-color: transparent;
    pointer-events: none;
}

/* Weather Alerts Treeview Styles */
.weather-alerts-section {
    border-bottom: 1px solid #3A3942;
}

.weather-alerts-treeview {
    padding: 0 20px 20px 20px;
}

.tree-item {
    margin-bottom: 8px;
}

.tree-header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    position: relative;
    gap: 8px;
}

.tree-header:hover {
    background-color: #3A3942;
}

.tree-caret {
    color: #888888;
    font-size: 24px;
    margin-right: 0;
    transition: transform 0.2s ease;
    width: 24px;
    height: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tree-header.expanded .tree-caret {
    transform: rotate(90deg);
}

.tree-title {
    color: #F6F8FB;
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

/* HoangNV đưa ra ý kiến đổi màu cho tích V từ trắng thành đen */
.tree-checkbox {
    width: 16px;
    height: 16px;
    margin-left: 0;
    accent-color: #7e49bd;
    cursor: pointer;
    filter: invert(1);
    border-color: #7e49bd;
}

.tree-content {
    padding-left: 24px;
    display: none;
    border-left: 1px solid #404048;
    margin-left: 6px;
}

.tree-item.expanded>.tree-content {
    display: block;
}

.tree-item .tree-item {
    margin-bottom: 4px;
}

.tree-item .tree-item .tree-header {
    padding: 6px 16px;
    font-size: 13px;
}

.tree-item .tree-item .tree-title {
    font-size: 13px;
    color: #BECACF;
}

.tree-item .tree-item .tree-item .tree-header {
    padding: 4px 16px;
    font-size: 12px;
}

.tree-item .tree-item .tree-item .tree-title {
    font-size: 12px;
    color: #B8B5C7;
}

.tree-item .tree-item .tree-item .tree-content {
    padding-left: 20px;
}

/* Animation for treeview toggling */
.tree-item.toggling {
    background-color: rgba(74, 175, 80, 0.1);
    transition: background-color 0.2s ease;
}

.tree-item.toggling .tree-header {
    background-color: rgba(74, 175, 80, 0.2);
}

/* Ensure proper spacing and alignment */
.tree-item:last-child {
    margin-bottom: 0;
}

.tree-content .tree-item:last-child {
    margin-bottom: 0;
}

/* Hover effects for tree items */
.tree-item:hover>.tree-header {
    background-color: #3A3942;
}

.tree-item .tree-item:hover>.tree-header {
    background-color: #2a2831;
}

.tree-item .tree-item .tree-item:hover>.tree-header {
    background-color: #212027;
}

/* Alert Legend Section Styles */
.alert-legend-section {
    padding: 20px;
    border-top: 1px solid #3A3942;
    background-color: #2D2B36;
}

.legend-title {
    color: #232C36;
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: left;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    background-color: #212027;
    transition: background-color 0.2s ease;
}

.legend-item:hover {
    background-color: #2a2831;
}

.legend-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 14px;
    flex-shrink: 0;
}

.legend-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.legend-label {
    color: #D3CFF5;
    font-family: 'Wix Madefor Text', sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
}

/* Responsive adjustments for settings sidebar */
@media (max-width: 768px) {
    .settings-sidebar-dialog {
        max-width: 100%;
        width: 100%;
        /* top and height are inherited from desktop, but footer height is different on mobile */
        height: calc(100vh - var(--dashboard-menu-bar-height, 64px) - var(--footer-height, 60px));
    }

    .weather-layers-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .weather-alerts-treeview {
        padding: 0 15px 15px 15px;
    }

    .tree-title {
        font-size: 13px;
    }

    .tree-item .tree-item .tree-title {
        font-size: 12px;
    }

    .legend-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .legend-title {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .legend-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .legend-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .settings-sidebar-dialog {
        /* top is inherited from desktop, height uses mobile footer height */
        height: calc(100vh - var(--dashboard-menu-bar-height, 64px) - var(--footer-height, 60px));
    }

    .weather-layers-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 10px 10px 10px;
    }


    .weather-layer-icon {
        width: 28px;
        height: 28px;
    }

    .weather-layer-icon img {
        width: 20px;
        height: 20px;
    }

    .weather-layer-label {
        font-size: 9px;
    }

    .legend-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .legend-title {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .legend-icon {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .legend-label {
        font-size: 10px;
    }

    .alert-legend-section {
        padding: 15px;
    }
}

#windy .leaflet-popup-content-wrapper.dashboard-popup-wrapper {
    background: white !important;
    box-shadow: none !important;
    border-radius: 16px !important;
}

#windy .leaflet-popup-content.dashboard-popup-content {
    min-height: 50px !important;
    width: 338px !important;
}

.dashboard-popup {
    background: #fff;
    border-radius: 16px;
    font-family: inherit;
    position: relative;
}

.dashboard-popup-title {
    font-weight: 700;
    font-size: 18px;
    color: #222;
}

.dashboard-popup-location {
    color: #6B7280;
    font-size: 14px;
    margin-top: 2px;
}

.dashboard-popup-row {
    color: #374151;
    font-size: 14px;
    margin-bottom: 2px;
}

.dashboard-popup-label {
    font-weight: 400;
    color: #5E6E7D;
}

.dashboard-popup-value {
    font-weight: 700;
    margin-left: 4px;
}

.dashboard-popup-detail-link-wrap {
    text-align: right;
    margin-top: 12px;
}

.dashboard-popup-detail-link {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    user-select: none;
}

#windy .leaflet-container a {
    color: #6C4ACF !important;
    font-weight: 700 !important;
    font-size: 17px !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.dashboard-popup-detail-link:hover {
    color: #4B299A;
    text-decoration: underline;
}

.dashboard-popup-detail-arrow {
    font-size: 16px;
    margin-left: 2px;
}

/* Mobile responsive cho dashboard popup */
@media (max-width: 768px) {
    #windy .leaflet-popup-content.dashboard-popup-content {
        width: 280px !important;
        min-height: 45px !important;
    }

    .dashboard-popup {
        min-width: 270px;
        max-width: 285px;
        padding: 12px;
    }

    .dashboard-popup-header {
        margin-bottom: 8px;
        padding-right: 35px;
    }

    .dashboard-popup-icon {
        width: 32px;
        height: 32px;
        margin-right: 10px;
    }

    .dashboard-popup-icon img {
        width: 32px !important;
        height: 32px !important;
    }

    .dashboard-popup-title {
        font-size: 16px;
        font-weight: 600;
    }

    .dashboard-popup-location {
        font-size: 12px;
        margin-top: 1px;
    }

    .dashboard-popup-row {
        font-size: 13px;
        margin-bottom: 1px;
    }

    .dashboard-popup-close-btn {
        top: 10px;
        right: 10px;
    }

    .dashboard-popup-detail-link-wrap {
        margin-top: 10px;
    }

    .dashboard-popup-detail-link {
        font-size: 13px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    #windy .leaflet-popup-content.dashboard-popup-content {
        width: 260px !important;
    }

    .dashboard-popup {
        min-width: 250px;
        max-width: 265px;
        padding: 10px;
    }

    .dashboard-popup-header {
        padding-right: 32px;
    }

    .dashboard-popup-close-btn {
        top: 8px;
        right: 8px;
    }

    .dashboard-popup-title {
        font-size: 15px;
    }

    .dashboard-popup-location {
        font-size: 11px;
    }

    .dashboard-popup-row {
        font-size: 12px;
    }

    .dashboard-popup-detail-link {
        font-size: 12px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        cursor: pointer;
    }
    
    .dashboard-popup-detail-link svg,
    .dashboard-popup-detail-link svg * {
        pointer-events: none !important;
    }
    
}

.farm-popup {
    background: #fff;
    border-radius: 16px;
    font-family: inherit;
}

.dashboard-popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-right: 40px;
}

.dashboard-popup-header>div:first-child {
    display: flex;
    align-items: center;
    flex: 1;
}

.dashboard-popup-icon {
    background: #EAFBF3;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}



.dashboard-popup-close-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    position: absolute;
    top: 0px;
    right: 5px;
    z-index: 10;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.dashboard-popup-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.dashboard-popup-close-btn:hover img {
    opacity: 1;
}

.dashboard-marker-img {
    width: 50% !important;
}

.popup-loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    /* height: 100px; */
}

.popup-loading-spinner .spinner {
    margin-top: 50px;
}

/* Responsive nowcast-modal-dialog */
.nowcast-modal-dialog {
    margin: var(--dashboard-menu-bar-height, 0px) auto 0 auto;
    width: 95vw;
    max-width: 1394px;
    height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
    max-height: 856px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 576px) {
    .nowcast-modal-dialog {
        margin: var(--dashboard-menu-bar-height, 0px) auto 0 auto;
        width: 90vw;
        max-width: 1394px;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
        max-height: 856px;
    }
}

@media (min-width: 768px) {
    .nowcast-modal-dialog {
        margin: var(--dashboard-menu-bar-height, 0px) auto 0 auto;
        width: 85vw;
        max-width: 1394px;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
        max-height: 856px;
    }
}

@media (min-width: 992px) {
    .nowcast-modal-dialog {
        margin: var(--dashboard-menu-bar-height, 0px) auto 0 auto;
        width: 80vw;
        max-width: 1394px;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
        max-height: 856px;
    }
}

@media (min-width: 1200px) {
    .nowcast-modal-dialog {
        margin: var(--dashboard-menu-bar-height, 0px) auto 0 auto;
        width: 75vw;
        max-width: 1394px;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
        max-height: 856px;
    }
}

/* Tablet landscape responsive */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .nowcast-modal-dialog {
        margin: var(--dashboard-menu-bar-height, 0px) auto 0 auto;
        width: 90vw;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px));
    }

    .nowcast-modal-content {
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px));
    }

    .nowcast-modal-alert {
        flex-direction: row;
        margin: 0 16px 16px 32px;
    }

    .nowcast-modal-params {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* Large desktop screens */
@media (min-width: 1400px) {
    .nowcast-modal-dialog {
        margin: var(--dashboard-menu-bar-height, 0px) auto 0 auto;
        width: 70vw;
        max-width: 1394px;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) - 20px);
        max-height: 856px;
    }
}

.nowcast-modal-header {
    padding: 24px 32px 0 32px;
}

.nowcast-modal-location {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-arrow {
    display: none;
}

.nowcast-modal-location-coord {
    font-size: 14px;
    color: #888;
}

.nowcast-modal-tabs {
    margin-top: 16px;
    display: flex;
    gap: 24px;
    position: relative;
}

.nowcast-modal-tabs .tab {
    cursor: pointer;
    color: #888;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    user-select: none;
    overflow: visible;
    position: relative;
    border-radius: 8px 8px 0 0;
}


.nowcast-modal-tabs .tab.active {
    background: #F0EFFA;
    border-radius: 8px 8px 0 0;
    color: #4D459B;
    font-weight: 600;
    transform: translateY(-2px);
}


/* Cải thiện hiệu ứng transition cho tất cả tabs */
.nowcast-modal-tabs .tab {
    will-change: transform, color, background-color;
}

/* Smooth transition cho content changes */
.nowcast-modal-alert,
.nowcast-modal-24h-content {
    will-change: opacity, transform;
}

.nowcast-modal-24h-content {
    margin-top: 24px;
}

/* Thêm hiệu ứng stagger cho các tab khi hover */
.nowcast-modal-tabs .tab:nth-child(1) {
    transition-delay: 0ms;
}

.nowcast-modal-tabs .tab:nth-child(2) {
    transition-delay: 50ms;
}

.nowcast-modal-tabs .tab:nth-child(3) {
    transition-delay: 100ms;
}

.nowcast-modal-tabs .tab:nth-child(4) {
    transition-delay: 150ms;
}

.nowcast-modal-tabs .tab:nth-child(5) {
    transition-delay: 200ms;
}

.nowcast-modal-tabs .tab:nth-child(6) {
    transition-delay: 250ms;
}

/* Cải thiện hiệu ứng hover cho mobile */
@media (hover: hover) {
    .nowcast-modal-tabs .tab:hover {
        color: #4D459B;
        transform: translateY(-2px);
    }

    .nowcast-modal-tabs .tab:hover::before {
        transform: scaleX(1);
    }
}

/* Hiệu ứng smooth cho việc thay đổi content */
.nowcast-modal-main {
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nowcast-modal-main.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.nowcast-modal-main>* {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading state cho tabs */
.nowcast-modal-tabs .tab.loading {
    pointer-events: none;
    opacity: 0.7;
}

.nowcast-modal-tabs .tab.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #4D459B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

.nowcast-modal-models {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    cursor: pointer;
}

.nowcast-modal-models span {
    color: #888;
}

.nowcast-modal-models .active {
    color: #4D459B;
    font-weight: 600;
}

.btn-compare {
    background: #4D459B;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
}

.btn-export {
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s ease;
}

.btn-export:hover {
    background: #218838;
}

.btn-export:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-import {
    background: #17a2b8;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s ease;
}

.btn-import:hover {
    background: #138496;
}

.btn-import:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.nowcast-modal-main {
    padding-top: 16px;
    /* Responsive: fit within modal height */
    flex: 1;
    overflow-y: auto;
}

.nowcast-modal-alert {
    display: flex;
    margin: 0 16px 16px 32px;
    gap: 20px;
    align-items: flex-start;
}

/* Left half: Current weather + Alert content */
.nowcast-modal-alert-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #F6F8FB;
    border-radius: 16px;
    padding: 16px;
}

/* Current weather box */
.current-weather-box {
    border-radius: 16px;
}

.current-weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-weather-title {
    font-size: 16px;
    font-weight: 500;
    color: #3D4F62;
}

.current-weather-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.current-weather-icon {
    flex-shrink: 0;
}

.current-weather-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.current-weather-temp {
    font-size: 24px;
    font-weight: 700;
    color: #242C36;
}

.current-weather-desc {
    font-size: 16px;
    color: #3D4F62;
}

/* Alert content wrapper */
.alert-content-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    border-radius: 16px;
    padding: 16px;
    background-color: #FFFFFF;
    width: fit-content;
    /* max-width: 100%; */
    min-width: 645px;
    min-height: 65px !important;
}

@media (max-width: 768px) {
    .alert-content-wrapper {
        flex-direction: column;
        min-width: auto;
        width: 100%;
        padding: 12px;
        border-radius: 12px;
        min-height: auto !important;
    }
}

@media (max-width: 480px) {
    .alert-content-wrapper {
        padding: 10px;
        border-radius: 10px;
    }
}

.alert-icon {
    flex-shrink: 0;
    margin-right: 16px;
}

@media (max-width: 768px) {
    .alert-icon {
        margin-right: 0;
        margin-bottom: 12px;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .alert-icon {
        margin-bottom: 10px;
    }
}

/* Right half: Parameters */
.nowcast-modal-alert-right {
    flex: 1;
}

@media (max-width: 768px) {
    .nowcast-modal-alert-right {
        width: 100%;
        flex: none;
    }
}

.alert-content {
    flex: 1;
    margin-left: 16px;
}

@media (max-width: 768px) {
    .alert-content {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
        flex: none;
    }
}

@media (max-width: 480px) {
    .alert-content {
        margin-top: 10px;
    }
}

.alert-title {
    font-size: 16px;
    font-weight: 700;
    color: #242C36;
    margin-bottom: 8px;
}

.alert-desc {
    color: #222;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .alert-title {
        font-size: 15px;
        text-align: center;
    }

    .alert-desc {
        font-size: 13px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .alert-title {
        font-size: 14px;
    }

    .alert-desc {
        font-size: 12px;
    }
}

.alert-tags {
    display: flex;
    gap: 12px;
}

@media (max-width: 768px) {
    .alert-tags {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .alert-tags {
        gap: 6px;
    }
}

.alert-tag {
    display: flex;
    align-items: center;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .alert-tag {
        font-size: 13px;
        padding: 3px 10px;
    }
}

@media (max-width: 480px) {
    .alert-tag {
        font-size: 12px;
        padding: 2px 8px;
    }
}

.alert-tag-red {
    background: #FFF0F0;
}

.alert-tag-green {
    background: #E8F8F5;
}

.tag-icon {
    margin-right: 6px;
}

@media (max-width: 768px) {
    .tag-icon {
        margin-right: 4px;
    }
}

@media (max-width: 480px) {
    .tag-icon {
        margin-right: 3px;
    }
}

/* Alert content hidden state */
.alert-content-hidden {
    display: none !important;
}

/* Current weather header when no alert */
.current-weather-header-no-alert {
    flex-direction: column;
    gap: 50px;
}

/* Current weather title when no alert */
.current-weather-title-no-alert {
    text-align: left;
    width: 100%;
}

/* Current weather main when no alert */
.current-weather-main-no-alert {
    width: 100%;
    justify-content: center;
    background-color: white;
    padding: 16px 0;
    border-radius: 15px;
}

/* Mobile responsive for no-alert states */
@media (max-width: 768px) {
    .current-weather-header-no-alert {
        gap: 30px;
    }

    .current-weather-main-no-alert {
        padding: 12px 0;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .current-weather-header-no-alert {
        gap: 20px;
    }

    .current-weather-main-no-alert {
        padding: 10px 0;
        border-radius: 10px;
    }
}

.nowcast-modal-params {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 16px;
    width: 100%;
}

.param {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #F6F8FB;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    min-width: 192px;
}

.param-label {
    color: #888;
    font-size: 15px;
}

.param-value {
    font-size: 18px;
    font-weight: 600;
    color: #242C36;
}

.nowcast-modal-recommend {
    background: #F9FAFB;
    border-radius: 16px;
    padding: 16px;
    margin: 16px 16px 0 32px;
}

.recommend-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.recommend-desc {
    color: #222;
    font-size: 15px;
}

.recommend-desc ul {
    margin: 8px 0 0 20px;
}

.nowcast-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 25px 16px 25px;
    border-radius: 12px;
    gap: 24px;
}

.nowcast-modal-footer .footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nowcast-modal-footer .footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #8dc153;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(141, 193, 83, 0.08);
}

.btn-footer.btn-primary {
    background: #8dc153;
    color: #fff;
    font-weight: 600;
}

.btn-footer:not(.btn-primary) {
    background: #fff;
    color: #8dc153;
    border: 1.5px solid #8dc153;
}

.btn-footer:not(.btn-primary):hover {
    background: #eaf6e0;
    color: #6fa12e;
}

.btn-footer.btn-primary:hover {
    background: #6fa12e;
    color: #fff;
}

@media (max-width: 768px) {
    .nowcast-modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 12px;
    }

    .nowcast-modal-footer .footer-right {
        justify-content: flex-end;
    }

    .btn-footer {
        width: 100%;
        justify-content: center;
    }

    /* Cải thiện tabs cho mobile */
    .nowcast-modal-tabs {
        gap: 16px;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    /* Responsive nowcast modal dialog for mobile */
    .nowcast-modal-dialog {
        width: 98vw;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) + 20px);
        margin: calc(var(--dashboard-menu-bar-height, 0px) + 1vh) auto 0 auto;
    }

    .nowcast-modal-content {
        border-radius: 12px;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) + 20px);
    }

    .nowcast-modal-header {
        padding: 16px 20px 0 20px;
    }

    .nowcast-modal-header-top {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .nowcast-modal-location {
        font-size: 16px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
        flex: none;
        order: 1;
    }

    .nowcast-modal-location .back-arrow {
        order: 1;
        margin-right: 8px;
    }

    .nowcast-modal-location .nowcast-modal-location-icon {
        order: 2;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .nowcast-modal-location .nowcast-modal-location-icon img {
        width: 32px;
        height: 32px;
    }

    .nowcast-modal-location .nowcast-modal-location-name-wrapper {
        order: 3;
        flex: 1;
    }

    .nowcast-modal-models {
        width: 100%;
        justify-content: flex-start;
        order: 2;
    }

    .nowcast-modal-location-name-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .nowcast-modal-location-coord {
        font-size: 12px;
    }

    .nowcast-close-btn {
        display: none !important;
    }

    .back-arrow {
        display: flex !important;
        position: static;
        font-size: 24px;
        color: #4D459B;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .back-arrow:hover {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.05);
    }

    .nowcast-modal-header {
        position: relative;
    }

    .nowcast-modal-main {
        padding-top: 12px;
    }

    .nowcast-modal-alert {
        flex-direction: column;
        margin: 0;
        gap: 12px;
        width: 100%;
        padding: 0 20px;
    }

    .nowcast-modal-alert-left {
        padding: 12px;
        order: 1;
        width: 100%;
        margin: 0;
    }

    .nowcast-modal-alert-right {
        order: 2;
        width: 100%;
        margin: 0;
    }

    .nowcast-modal-params {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 12px;
        width: 100%;
        margin: 0;
    }

    .param {
        padding: 8px;
        width: 100%;
        margin: 0;
        min-width: unset;
    }

    .nowcast-modal-tabs .tab {
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nowcast-modal-tabs .tab:hover {
        transform: translateY(-1px);
    }

    .nowcast-modal-tabs .tab.active {
        transform: translateY(-1px);
    }

    /* Cải thiện touch experience cho mobile */
    .nowcast-modal-tabs .tab {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* Giảm transition delay cho mobile */
    .nowcast-modal-tabs .tab:nth-child(1) {
        transition-delay: 0ms;
    }

    .nowcast-modal-tabs .tab:nth-child(2) {
        transition-delay: 25ms;
    }

    .nowcast-modal-tabs .tab:nth-child(3) {
        transition-delay: 50ms;
    }

    .nowcast-modal-tabs .tab:nth-child(4) {
        transition-delay: 75ms;
    }

    .nowcast-modal-tabs .tab:nth-child(5) {
        transition-delay: 100ms;
    }

    .nowcast-modal-tabs .tab:nth-child(6) {
        transition-delay: 125ms;
    }
}

/* Extra small screens (480px and below) */
@media (max-width: 480px) {
    .nowcast-modal-dialog {
        width: 100vw;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) + 20px);
        margin: var(--dashboard-menu-bar-height, 0px) 0 0 0;
        border-radius: 0;
    }

    .nowcast-modal-content {
        border-radius: 0;
        height: calc(100vh - var(--dashboard-menu-bar-height, 0px) - var(--footer-height, 0px) + 20px);
    }

    .nowcast-close-btn {
        display: none !important;
    }

    .back-arrow {
        display: flex !important;
        position: static;
        font-size: 20px;
        color: #4D459B;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .back-arrow:hover {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.05);
    }

    .nowcast-modal-header {
        position: relative;
    }

    .nowcast-modal-header {
        padding: 12px 16px 0 16px;
    }

    .nowcast-modal-header-top {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .nowcast-modal-location {
        font-size: 14px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        width: 100%;
        flex: none;
        order: 1;
    }

    .nowcast-modal-location .back-arrow {
        order: 1;
        margin-right: 6px;
    }

    .nowcast-modal-location .nowcast-modal-location-icon {
        order: 2;
        margin-right: 6px;
        flex-shrink: 0;
    }

    .nowcast-modal-location .nowcast-modal-location-icon img {
        width: 28px;
        height: 28px;
    }

    .nowcast-modal-location .nowcast-modal-location-name-wrapper {
        order: 3;
        flex: 1;
    }

    .nowcast-modal-models {
        width: 100%;
        justify-content: flex-start;
        order: 2;
    }

    .nowcast-modal-location-name-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .nowcast-modal-tabs {
        gap: 8px;
        margin-top: 8px;
    }

    .nowcast-modal-tabs .tab {
        font-size: 11px;
        padding: 4px 8px;
    }

    .nowcast-modal-main {
        padding-top: 8px;
    }

    .nowcast-modal-alert {
        margin: 0;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 16px;
    }

    .nowcast-modal-alert-left {
        order: 1;
        width: 100%;
        margin: 0;
    }

    .nowcast-modal-alert-right {
        order: 2;
        width: 100%;
        margin: 0;
    }

    .nowcast-modal-params {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 8px;
        width: 100%;
        margin: 0;
    }

    .nowcast-modal-footer {
        padding: 12px 16px 16px 16px;
    }

    .btn-footer {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Mobile landscape - hide content and show notification */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .nowcast-modal-content>*:not(.nowcast-landscape-notification) {
        display: none !important;
    }

    .nowcast-landscape-notification {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 20px;
        text-align: center;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .nowcast-landscape-notification .icon {
        font-size: 48px;
        margin-bottom: 16px;
        opacity: 0.8;
    }

    .nowcast-landscape-notification .title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .nowcast-landscape-notification .message {
        font-size: 14px;
        opacity: 0.9;
        line-height: 1.4;
    }

    .nowcast-landscape-notification .rotate-icon {
        display: inline-block;
        animation: rotatePhone 2s ease-in-out infinite;
        margin: 0 4px;
    }

    @keyframes rotatePhone {

        0%,
        100% {
            transform: rotate(0deg);
        }

        50% {
            transform: rotate(90deg);
        }
    }
}

.nowcast-landscape-notification {
    display: none;
}

.nowcast-modal-location-name-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
    margin-bottom: unset;
}

.nowcast-modal-header-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.nowcast-modal-header-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 1px solid #E8EEF0;
}

.nowcast-modal .close-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.nowcast-modal .close-btn:hover {
    background: none;
}

.compare-close-btn {
    background: white !important;
    border: none;
    padding: 8px;
    position: absolute;
    left: 0;
    top: 0;
}

.compare-modal-location-name {
    font-weight: 600;
    font-size: 16px;
}

.compare-modal-location-coord {
    font-weight: 400;
    font-size: 16px;
}

.nowcast-modal-models-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #F6F8FB;
    border-radius: 6px;
    /* height: 28px; */
}

.nowcast-modal-model {
    padding: 8px
}

.nowcast-modal-model:not(:last-child) {
    position: relative;
}

.nowcast-modal-model:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 1px;
    height: 50%;
    background: #E8EEF0;
}

.param-content {
    text-align: left;
}

.nowcast-modal-footer-report {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Hiệu ứng toggle-switch cho nowcast-modal-footer-notification */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    border-radius: 24px;
    background: #e0e0e0;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
}

.toggle-switch.active {
    background: #8dc153;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.nowcast-modal-footer .toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

.nowcast-modal-footer-notification {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Farm Modal Styles */
.farm-modal {
    position: fixed;
    top: 84px;
    left: 80px;
    z-index: 999;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.farm-modal-content {
    width: 413px;
    height: 678px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: farmModalSlideIn 0.3s ease-out;
}

@keyframes farmModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.farm-modal-header {
    color: #242C36;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.farm-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Wix Madefor Text', sans-serif;
}

.farm-modal-close-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.farm-modal-close-icon:hover {
    opacity: 0.7;
}

.farm-modal-body {
    padding: 10px 24px;
    height: calc(100% - 50px);
    overflow-y: auto;
}

.farm-search {
    display: flex;
    align-items: center;
    background: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    padding: 5px 5px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.farm-search:focus-within {
    border-color: #4D459B;
    box-shadow: 0 0 0 3px rgba(77, 69, 155, 0.1);
}

.farm-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #242C36;
    outline: none;
    font-family: 'Wix Madefor Text', sans-serif;
}

.farm-search input::placeholder {
    color: #6C757D;
}

.search-input-group {
    display: flex;
    align-items: center;
    width: 70%;
    background: transparent;
}

.search-input-group img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0.6;
}

.disaster-event-search {
    display: flex;
    align-items: center;
    border-radius: 8px;
    padding: 5px 5px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
    gap: 12px;
}

.disaster-event-search:focus-within {
    border-color: #4D459B;
    box-shadow: 0 0 0 3px rgba(77, 69, 155, 0.1);
}

.disaster-event-search .search-input-group {
    border: 1px solid #E9ECEF;
    padding: 3px;
}

.disaster-event-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #242C36;
    outline: none;
    font-family: 'Wix Madefor Text', sans-serif;
}

.disaster-event-search input::placeholder {
    color: #6C757D;
}

.disaster-event-stats {
    color: #dc3545;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    padding: 8px 12px;
}

.year-select-group {
    display: flex;
    align-items: center;
    width: 30%;
}

.year-select {
    padding: 6px 12px;
    border: 1px solid #E9ECEF;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #242C36;
    font-family: 'Wix Madefor Text', sans-serif;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

.year-select:hover {
    border-color: #4D459B;
}

.year-select:focus {
    border-color: #4D459B;
    box-shadow: 0 0 0 2px rgba(77, 69, 155, 0.1);
}

.farm-info {
    margin-bottom: 24px;
}

.farm-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background: #F8F9FA;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #E9ECEF;
    transition: all 0.2s ease;
}

.farm-item:hover {
    background: #E9ECEF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.farm-icon {
    width: 48px;
    height: 48px;
    background: #4D459B;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.farm-icon img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.farm-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.farm-details h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    font-family: 'Wix Madefor Text', sans-serif;
}

.farm-details p {
    margin: 4px 0;
    font-size: 14px;
    color: #6C757D;
    font-family: 'Wix Madefor Text', sans-serif;
}

.farm-details .farm-label {
    color: #3D4F62;
    font-weight: 500;
}

.farm-details .farm-value {
    font-weight: 400;
}

.farm-detail-link {
    margin-top: auto;
    align-self: flex-end;
    color: #4D459B;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: 'Wix Madefor Text', sans-serif;
    padding: 8px 0;
}

.farm-detail-link:hover {
    color: #2D1B69;
    text-decoration: underline;
}

.farm-detail-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.farm-detail-link-default {
    margin-top: auto;
    align-self: flex-end;
    color: #4D459B;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: 'Wix Madefor Text', sans-serif;
    padding: 8px 0;
}

.farm-detail-link-default:hover {
    color: #2D1B69;
    text-decoration: underline;
}

.farm-warning-radius-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4D459B;
    font-family: 'Wix Madefor Text', sans-serif;
    user-select: none;
}

.farm-warning-radius-checkbox:hover {
    color: #2D1B69;
}

.farm-warning-radius-checkbox:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
    color: #6C757D;
}

.farm-warning-radius-checkbox:has(input:disabled):hover {
    color: #6C757D;
}

.farm-warning-radius-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4D459B;
}

.farm-warning-radius-input:checked {
    accent-color: #4D459B;
}

.farm-warning-radius-input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .farm-modal {
        top: 60px;
        left: 60px;
    }

    .farm-modal-content {
        width: 95%;
        height: 90%;
        margin: 20px;
    }

    .farm-modal-header {
        padding: 16px 20px;
    }

    .farm-modal-body {
        padding: 20px;
    }

    .farm-search {
        margin-bottom: 10px;
    }

    .farm-info {
        height: calc(100vh - 400px);
        overflow-y: auto;
        margin-bottom: 0;
    }

    .farm-item {
        padding: 10px;
        margin-bottom: 8px;
    }

    .farm-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
}

.nowcast-24h-table {
    min-width: 900px;
    text-align: center;
    width: 100%;
    border-collapse: collapse;
}

.nowcast-24h-table th,
.nowcast-24h-table td {
    padding: 8px 6px;
    border: 1px solid #ddd;
    font-size: 12px;
}

.nowcast-24h-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.nowcast-24h-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.nowcast-24h-table th:first-child {
    text-align: center;
    width: 60px;
    background-color: #e8f4f8;
}

.modal-open .modal.nowcast-modal {
    overflow-y: hidden;
}

/* Weather Table */
.weather-table-container {
    padding: 30px;
    position: relative;
    overflow: hidden;
}
/* Weather Table */
.weather-data-table-container {
    padding: 0px;
    position: relative;
    overflow: hidden;
}

.nowcast-24h-table-horizontal {
    display: flex;
    position: relative;
    align-items: flex-start;
    margin-top: 8px;
}

/* Evaluation Past Table Horizontal - tương tự nowcast-24h-table-horizontal */
.evaluation-past-table-horizontal {
    display: flex;
    position: relative;
    align-items: flex-start;
    margin-top: 8px;
    gap: 0;
}

/* Model column title container */
.evaluation-past-table-model-column-title {
    flex-shrink: 0;
    width: 120px;
    background: #F6F8FB;
    border-left: 1px solid #E1E5E9;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

/* Weather table past container */
#weatherTablePast {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Weather table column title past container */
#weatherTableColumnTitlePast {
    flex-shrink: 0;
    width: 120px;
}

/* Model column cells */
.evaluation-past-table-model-column-title .weather-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-bottom: 1px solid #E1E5E9;
    min-height: 35px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* Wind speed model cells - left aligned */
.evaluation-past-table-model-column-title .weather-cell.data-wind-speed {
    justify-content: flex-start;
    text-align: left;
    align-items: center;
    border-bottom: none;
}

.evaluation-past-table-model-column-title .weather-cell:last-child {
    border-bottom: none;
}

/* Model pill styling for model column */
.evaluation-past-table-model-column-title .model-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid #E1E5E9;
    font-size: 11px;
    font-weight: 500;
}

.evaluation-past-table-model-column-title .model-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Evaluation Past: settings row below the table */
.evaluation-past-settings {
    display: flex;
    gap: 16px;
    margin-top: 2px;
    margin-left: 160px
}

.evaluation-past-settings-item {
    flex: 1 1 60%;
    background: #7B7B7B;
    color: #FFFFFF;
    border-radius: 8px;
    padding: 12px 16px;
}

.epsi-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #F6F8FB;
}

.evaluation-past-description {
    flex: 1 1 40%;
    background: #FFFFFF;
    color: #242C36;
    border-radius: 8px;
    padding: 12px 16px;
}

/* Left: model header pills */
/* Header row moved into .epsi-table as the first .epsi-row */

.model-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #EDEDED;
    font-style: italic;
    font-size: 14px;
}

.model-pill .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid #FFFFFF;
}

/* Left: compact table */
.epsi-table { width: 100%; }
.epsi-row {
    display: grid;
    grid-template-columns: 120px repeat(8, 1fr);
    align-items: center;
    gap: 8px;
}
.epsi-col.label { color: #FFFFFF; opacity: 0.95; }
.epsi-col.value { color: #FFFFFF; font-weight: 600; }

.epsi-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
    margin: 8px 0;
}

.badge-like {
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.epsi-actions {
    display: grid;
    grid-template-columns: 120px repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.epsi-action { color: #E6F6E2; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.epsi-action .toggle {
    width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #B7F07A; box-shadow: 0 0 0 2px rgba(183,240,122,0.25);
}
.epsi-action .toggle.on { background: #B7F07A; }

/* Style for "Thêm vào so sánh" text in evaluation-past-settings */
.evaluation-past-settings .epsi-col.value-small {
    font-size: 10px;
    font-weight: 400;
}

/* Toggle switch height adjustment for evaluation-past-settings */
.evaluation-past-settings .toggle-switch {
    height: 20px;
    width: 40px;
    border-radius: 20px;
}

.evaluation-past-settings .toggle-switch .toggle-slider {
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
}

.evaluation-past-settings .toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

/* Right: description and legend */
.epd-note {
    position: relative;
    margin-bottom: 10px;
}

.epd-note p {
    margin: 0;
    color: #F6F8FB;
    font-style: medium;
    line-height: 22px;
    font-size: 15px;
}

.epd-badge {
    display: inline-block;
    margin-left: 12px;
    background: #E53935;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
    vertical-align: middle;
}

.epd-legend {
    margin-top: 8px;
}

.epd-legend .legend-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.epd-legend .legend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.epd-legend .legend-label {
    margin-right: 8px;
    color: #3D4F62;
}

.epd-legend .legend-items {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.epd-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6B7280;
    font-style: italic;
}

.epd-legend .legend-line {
    width: 24px;
    height: 0;
    border-top: 2px solid var(--c, #2A7CF8);
}

.epd-legend .legend-line.dashed {
    border-top-style: dashed;
}

@media (max-width: 768px) {
    .evaluation-past-settings { flex-direction: column; }
    .evaluation-past-settings-item, .evaluation-past-description { flex: 1 1 auto; }
    .epsi-row, .epsi-actions {
        grid-template-columns: 90px repeat(8, 1fr);
        font-size: 12px;
    }
    .epsi-col.value-small {
        font-size: 10px;
    }
}

/* For compare period, stack model wrappers vertically */
.nowcast-24h-table-horizontal.compare-mode {
    flex-direction: column;
    align-items: stretch;
}

/* Model weather table wrapper - stack vertically */
.model-weather-table-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
    align-items: stretch;
}

.model-weather-table-wrapper:last-child {
    margin-bottom: 0;
}

.weather-table-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: flex-start;
}

/* Evaluation Past Table Row - tương tự weather-table-row */
.evaluation-past-table-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: flex-start;
}

.weather-table-column-high-precision {
    width: 40px;
    min-width: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    /* Height will be set dynamically by JavaScript to match weather-table-column-title */
}

.weather-table-column-high-precision img {
    width: 40px;
    max-height: 210px;
}

.weather-table-column-title {
    width: 160px;
    min-width: 160px;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 160px;
    background-color: #f8f9fa;
    position: sticky;
    left: 0;
    z-index: 2;
}

/* Evaluation Past Table Column Title - tương tự weather-table-column-title */
.evaluation-past-table-column-title {
    width: 160px;
    min-width: 160px;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 160px;
    background-color: #f8f9fa;
    position: sticky;
    left: 0;
    z-index: 2;
}

.weather-table-column-title .weather-cell {
    background: #F6F8FB;
    font-weight: 400;
    padding-left: 14px;
    font-size: 14px;
    border-right: 1px solid #99A8B7;
    display: flex;
    align-items: center;
    height: 35px;
    min-height: 35px;
    max-height: 35px;
}

/* Evaluation Past Table Column Title cells - tương tự weather-table-column-title */
.evaluation-past-table-column-title .weather-cell {
    background: #F6F8FB;
    font-weight: 400;
    padding-left: 14px;
    font-size: 14px;
    border-right: 1px solid #99A8B7;
    display: flex;
    height: 35px;
    min-height: 35px;
    max-height: 35px;
}

.evaluation-past-table-column-title .weather-cell-105 {
    height: 105px !important;
    min-height: 105px !important;
    max-height: 105px !important;
}

/* Evaluation Past Table Column Title cells height sẽ được set bằng JavaScript */

.weather-table {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 0;
    cursor: grab;
    user-select: none;
}

.weather-table:active {
    cursor: grabbing;
}

/* Ensure smooth scrolling behavior */
.weather-table {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for webkit browsers */
.weather-table::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for Firefox */
.weather-table {
    scrollbar-width: none;
}

.weather-row {
    display: grid;
    grid-template-columns: repeat(var(--weather-columns, 24), 60px);
    height: 35px;
    min-height: 35px;
    max-height: 35px;
}

.weather-row:first-child {
    background: #f9fafb;
    font-weight: 600;
}

.weather-cell {
    padding: 5px 8px;
    text-align: center;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    min-height: 35px;
    max-height: 35px;
    font-weight: 500;
}

.weather-cell-105 {
    height: 105px !important;
    min-height: 105px !important;
    max-height: 105px !important;
}

.none-cell {
    background: #ffffff !important;
    border: none !important;
}

/* .weather-cell:first-child styles moved to .weather-table-column-title .weather-cell */

.weather-table-column-title .weekday-row-label {
    background-color: #FFFFFF !important;
    font-size: 16px !important;
}

/* Evaluation Past Table weekday row label */
.evaluation-past-table-column-title .weekday-row-label {
    background-color: #FFFFFF !important;
    font-size: 16px !important;
}

.nowcast-24h-weather-icon {
    font-size: 20px;
}

.temp-cell {
    color: #3D4F62;
    font-weight: 600;
}

.rain-cell {
    color: #2A7CF8;
}

.wind-speed {
    font-weight: 600;
}

/* Wind speed legend cell styling */
.wind-speed-legend {
    text-align: left !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: fit-content;
    width: auto;
    padding-left: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.wind-direction {
    font-size: 16px;
}

/* Alerts Section */
.alerts-section {
    padding: 30px;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
}

.alerts-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #374151;
}

.alert-timeline {
    position: relative;
}

.timeline-hours {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 5px;
    margin-bottom: 15px;
    font-size: 11px;
    color: #6b7280;
}

.alert-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.alert-icon {
    width: 30px;
    font-size: 18px;
}

.alert-text {
    width: 250px;
    font-size: 13px;
    color: #374151;
    margin-right: 20px;
}

.alert-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    position: relative;
}

.weekday-cell {
    background: #F6F8FB !important;
    color: #3D4F62;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Added styling for empty weekday cells to create merge effect */
.weekday-cell:empty {
    position: relative;
    background: #ffffff !important;
}

.weather-row.max-height-30 {
    height: 35px;
    min-height: 35px;
    max-height: 35px;
}

.weather-row.height-40 {
    height: 35px;
    min-height: 35px;
    max-height: 35px;
}

.weather-row-3 {
    display: grid;
    grid-template-columns: repeat(var(--weather-columns, 24), 60px) auto;
    height: 105px;
    min-height: 105px;
    max-height: 105px;
}

.model-title-row {
    display: flex;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: visible;
    text-overflow: ellipsis;
    height: 40px;
}

.model-title-row-text {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100px;
}

.view-evaluate-nowcast-link {
    color: #4D459B;
    font-size: 16px;
    text-decoration: underline;
    font-weight: 500;
}

.model-title-row-icon {
    display: flex;
    align-items: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.model-title-row-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.model-info-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 16px;
    margin-left: auto;
    cursor: pointer;
    z-index: 10001;
    overflow: visible;
}

.model-info-icon {
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.model-info-icon:hover {
    opacity: 0.7;
}

.model-info-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 460px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    overflow: visible;
}

.model-info-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
}

.model-info-icon-wrapper:hover .model-info-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.model-info-tooltip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.model-info-tooltip-icon {
    display: flex;
    align-items: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.model-info-tooltip-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.model-info-tooltip-name {
    font-size: 16px;
    font-weight: 700;
    color: #3D4F62;
}

.model-info-tooltip-description {
    font-size: 14px;
    color: #5E6E7D;
    line-height: 1.5;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    font-weight: 400;
}

.model-info-tooltip-update {
    font-size: 14px;
    color: #5E6E7D;
    font-weight: 500;
}

@keyframes slideInDown {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Weather label flex for weather table */
.weather-label-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 0;
}

/* Weather label flex for weather table */
.weather-label-flex-evaluation-past {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    gap: 0;
}

.weather-label-text {
    min-width: 80px;
    font-weight: 400;
    font-size: 14px;
    color: #5E6E7D;
    line-height: 1;
    padding-right: 10px;
    padding-top: 8px;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.weather-label-unit {
    width: 40px;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: #3D4F62;
    line-height: 1;
    text-decoration: underline;
    letter-spacing: 0.1px;
    padding-top: 8px;
}

.weekday-cell:not(:last-child) {
    border-right: 1px solid #99A8B7;
}

.nowcast-modal-tabs .tab-lock {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.nowcast-modal-tabs .tab-inner {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 8px 8px 0 0;
    position: relative;
    z-index: 1;
    padding: 6px 16px;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

/* Move background and ripple effects to .tab-inner */
.nowcast-modal-tabs .tab-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #F0EFFA;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 8px 8px 0 0;
}

.nowcast-modal-tabs .tab-inner:hover,
.nowcast-modal-tabs .tab.active .tab-inner {
    color: #4D459B;
    background: #F0EFFA;
    font-weight: 600;
    transform: translateY(-2px);
}

.nowcast-modal-tabs .tab-inner:hover::before,
.nowcast-modal-tabs .tab.active .tab-inner::before {
    transform: scaleX(1);
}

/* Ripple effect for tab clicks */
.nowcast-modal-tabs .tab-inner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(77, 69, 155, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
    border-radius: 8px 8px 0 0;
}


.tab-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    will-change: transform, opacity;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    70% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.nowcast-main-content {
    min-height: 630px;
}

/* .weather-row>.weather-cell:first-child styles removed - no longer needed with new layout */

/* Background color khi hover cột */
.nowcast-24h-table-horizontal .weather-cell.col-hover {
    background-color: #c7c2f2 !important;
}

/* Không đổi nền khi hover cột ở Evaluation Past */
.evaluation-past-table-horizontal .weather-cell.col-hover {
    background: transparent;
}

/* Custom hover indicator for weatherTablePast */
.weather-column-hover-indicator {
    position: absolute;
    top: 0;
    width: 2px;
    background-color: #80B541;
    z-index: 10;
    pointer-events: none;
}

.weather-column-hover-indicator::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -4px;
    width: 10px;
    height: 10px;
    background-color: #80B541;
    border-radius: 50%;
    z-index: 11;
}

/* ========== WEATHER TABLE HOVER TOOLTIP ========== */
.weather-tooltip-row {
    position: absolute;
    top: 0;
    left: 160px;
    /* Start after column title */
    right: 0;
    height: 0;
    overflow: visible;
    z-index: 10;
}

/* Weather Table Tool Panel for Evaluation Past */
.weather-table-tool-panel {
    position: absolute;
    background-color: #3D4F62;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 15;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 200px;
}

.weather-table-tool-panel.show {
    opacity: 1;
    visibility: visible;
}

.weather-table-tool-panel::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 20px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 4px solid #3D4F62;
}

/* Mũi tên cho tooltip hiển thị bên trái */
.weather-table-tool-panel.show-left::before {
    left: auto;
    right: -4px;
    border-right: none;
    border-left: 4px solid #3D4F62;
}

/* Tool Panel Header */
.tool-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    font-weight: 600;
}

.tool-panel-location {
    font-size: 12px;
    color: white;
}

.tool-panel-time {
    font-size: 11px;
    color: #B8C5D1;
}

/* Tool Panel Content */
.tool-panel-content {
    padding: 4px 0;
}

.tool-panel-table {
    width: 100%;
    border-collapse: collapse;
}

.tool-panel-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-panel-row:last-child {
    border-bottom: none;
}

.tool-panel-label {
    padding: 3px 8px;
    font-weight: 500;
    color: #B8C5D1;
    width: 50px;
    font-size: 14px;
    white-space: nowrap;
}

.tool-panel-value {
    padding: 3px 6px;
    text-align: center;
    color: white;
    font-weight: 400;
    font-size: 10px;
    min-width: 35px;
}

/* Evaluation Past Table tooltip row */
.evaluation-past-tooltip-row {
    position: absolute;
    top: 0;
    left: 160px; /* Start after column title */
    right: 0;
    height: 0;
    overflow: visible;
    z-index: 10;
}

.weather-table-tooltip {
    position: absolute !important;
    background: #FD851C !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    z-index: 1010 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    min-width: 60px !important;
    text-align: center !important;
    top: -40px !important;
    transform: translateX(-50%) !important;
}

.weather-table-tooltip::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 6px solid transparent !important;
    border-right: 6px solid transparent !important;
    border-top: 6px solid #FD851C !important;
}

.weather-table-tooltip.show {
    opacity: 1 !important;
}

/* Toolbar icon text: ẩn mặc định, hiện khi hover */
.toolbar-icon-text {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(36, 44, 54, 0.85);
    color: #fff;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 20;
}

.toolbar-item:hover .toolbar-icon-text {
    opacity: 1;
    pointer-events: auto;
}

/* Popup Register Modal */
.register-modal .modal-dialog.register-modal-dialog {
    margin: 40vh auto;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(77, 69, 155, 0.18);
    background: transparent;
    overflow-y: hidden;
}

.register-modal-content {
    border-radius: 24px;
    background: #fff;
    border: none;
    box-shadow: 0 8px 40px rgba(77, 69, 155, 0.18);
    padding: 0;
    overflow: hidden;
}

.register-modal-header {
    position: relative;
    padding: 32px 32px 0 32px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.register-modal-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: #242C36;
    margin: 0;
    flex: 1;
    text-align: center;
}

.register-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 10px;
}

.register-modal-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.register-modal-body-wrapper-item-content {
    font-size: 15px;
    color: #5E6E7D;
    font-weight: 400;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.6;
}

.register-modal-body-wrapper-item-button {
    display: flex;
    justify-content: center;
}

.btn-register.btn-primary {
    background: #80B541;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: 12px 32px;
    box-shadow: 0 4px 16px rgba(77, 69, 155, 0.10);
    transition: background 0.2s, box-shadow 0.2s;
    width: 80%;
}

.btn-register.btn-primary:hover {
    background: #669933;
    box-shadow: 0 8px 24px rgba(77, 69, 155, 0.18);
}

.btn-register.btn-primary:active {
    background: #669933 !important;
    box-shadow: 0 8px 24px rgba(77, 69, 155, 0.18);
}

@media (max-width: 600px) {
    .register-modal .modal-dialog.register-modal-dialog {
        max-width: 95vw;
        margin: 20px auto;
    }

    .register-modal-content,
    .register-modal-header,
    .register-modal-body {
        padding: 16px !important;
    }

    .register-modal-header h4 {
        font-size: 18px;
    }

    .btn-register.btn-primary {
        font-size: 15px;
        padding: 10px 18px;
    }
}

#registerModal {
    overflow-y: hidden;
    z-index: 1200 !important;
}

/* === PRICING MODAL STYLES === */
.price-modal {
    z-index: 9999;
}

.price-modal-header {
    flex-shrink: 0;
}

.price-close-btn {
    background: white !important;
    border: none;
    padding: 16px 32px;
    position: absolute;
    left: 0;
    top: 0;
}

.price-modal-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
}

.price-modal .modal-dialog {
    background-color: #fff;
    position: fixed;
    top: 60px;
    /* Height of dashboard menu bar */
    left: 0;
    bottom: 42px;
    /* Height of footer */
    right: 0;
    width: 100vw;
    height: calc(100vh - 95px);
    /* Full height minus menu bar and footer */
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
}

.pricing-modal-content {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 18px;

    padding: 32px 16px 32px 16px;
    width: 100%;
    margin: 0 auto;
}

.pricing-modal-content-header {
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 2.4;
}

.pricing-modal-content-header h4 {
    font-size: 24px;
    font-weight: 700;
    color: #242C36;
    margin: 0;
    flex: 1;
    text-align: center;
}

.pricing-plans {
    display: flex;
    gap: 32px;
    justify-content: center;
    align-items: stretch;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pricing-plan {
    background: #fff;
    border-radius: 16px;
    flex: 1 1 300px;
    min-width: 260px;
    max-width: 340px;
    padding: 32px 20px 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s;
    position: relative;
    border: 1px solid #E8EEF0;
}

.pricing-plan:hover {
    background: #fff;
    border: 1px solid #756EBD;
    box-shadow: 0 4px 12px rgba(117, 110, 189, 0.2);
}

.plan-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 1px;
    color: #222;
}

.plan-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    font-size: 2.1rem;
    font-weight: 800;
    color: rgba(77, 69, 155, 1);
    margin: 16px 0 8px 0;
    width: 100%;
}

.plan-price .plan-price-old {
    font-size: 1rem;
    color: #aaa;
    text-decoration: line-through;
    margin-right: 8px;
    font-weight: 400;
}

.plan-action {
    margin: 18px 0 10px 0;
    width: 100%;
}

.plan-action .btn {
    width: 100%;
    padding: 12px 0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    background: #80B541;
    color: #fff;
    transition: background 0.2s;
    cursor: pointer;
}

.plan-action .btn:disabled,
.plan-action .btn.disabled {
    background: #bdbdbd;
    color: #fff;
    cursor: not-allowed;
}

.plan-action .btn:hover:not(:disabled) {
    background: #669933;
}

.plan-features {
    margin-top: 12px;
    width: 100%;
    text-align: left;
    padding-left: 0;
    list-style: none;
}

.plan-features li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #333;
}

.plan-features li .icon {
    color: #4CAF50;
    margin-right: 8px;
    font-size: 1.2em;
    font-weight: bold;
}

.price-modal-content {
    background-clip: unset !important;
    border: unset !important;
    border-radius: 0 !important;
}

@media (max-width: 900px) {
    .pricing-plans {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .pricing-plan {
        max-width: 100%;
        width: 100%;
    }
}

/* === END PRICING MODAL STYLES === */

.pricing-plan-description {
    font-size: 15px;
    color: #5E6E7D;
    font-weight: 400;
}

.plan-price-new {
    display: flex;
    flex-direction: row;
    align-items: end;
    justify-content: center;

    gap: 8px;
}

.plan-price-new-number {
    font-size: 2.1rem;
    font-weight: 800;
    color: rgba(77, 69, 155, 1);
}

.plan-price-new-unit {
    font-size: 1rem;
    color: #5E6E7D;
    font-weight: 500;
    margin-bottom: 1vh;
}

.plan-price-prefix {
    padding-bottom: 2vh;
    font-size: 1.2rem;
    color: rgba(77, 69, 155, 1);
    font-weight: 500;
}

.register-modal.show~.modal-backdrop {
    z-index: 1100 !important;
    background: rgba(0, 0, 0, 0.7) !important;
}

.nowcast-chart-tabs {
    padding: 16px 32px;
    display: flex;
    gap: 24px;
    position: relative;
}

.nowcast-chart-tabs .tab {
    cursor: pointer;
    text-transform: uppercase;
    color: #8A9CAB;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    user-select: none;
    overflow: visible;
    position: relative;
    border-radius: 8px 8px 0 0;
}


.nowcast-chart-tabs .tab.active {
    color: #242C36;
    font-weight: 600;
    transform: translateY(-2px);
}


/* Cải thiện hiệu ứng transition cho tất cả tabs */
.nowcast-chart-tabs .tab {
    will-change: transform, color, background-color;
}

.nowcast-chart-tabs .tab-inner:hover,
.nowcast-chart-tabs .tab.active .tab-inner {
    color: #4D459B;
    font-weight: 600;
    transform: translateY(-2px);
    text-decoration: underline;
}

.nowcast-chart-tabs .tab-lock {
    position: absolute;
    top: -10px;
    right: -15px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.nowcast-highchart-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Hiển thị chart và chú thích cạnh nhau, căn giữa theo chiều dọc */
.nowcast-highchart-wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    width: 100%;
    margin-bottom: 16px;
}

/* Chart chiếm phần lớn không gian */
.nowcast-highchart-wrap #nowcast-highchart-24h,
.nowcast-highchart-wrap [id^="nowcast-highchart-"] {
    width: 80%;
    min-width: 0;
    height: 480px;
    display: block;
}

/* Chú thích bên phải */
.nowcast-highchart-legend {
    min-width: 180px;
    max-width: 220px;
    background: #F6F8FB;
    border-radius: 8px;
    padding: 18px 20px 18px 20px;
    font-size: 16px;
    color: #3D4F62;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

.nowcast-highchart-legend h4 {
    font-size: 17px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #222;
}

.nowcast-highchart-legend div {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.7;
    font-size: 16px;
    font-weight: 500;
    min-height: 28px;
}

.nowcast-highchart-legend img {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: none;
    display: inline-block;
    margin-right: 2px;
    vertical-align: middle;
}

.nowcast-highchart-legend p {
    margin: 0;
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: #3D4F62;
}

/* Skeleton Loading Effects for Dashboard Popup - Chỉ cho các phần dữ liệu */
.dashboard-popup .skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    display: inline-block;
    min-width: 40px;
    height: 16px;
}


@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Skeleton Loading Effects for Nowcast Modal - Chỉ cho dashboard */
.nowcast-modal .skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    display: inline-block;
    min-width: 60px;
    height: 20px;
}

.nowcast-modal .skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    min-height: 245px;
}

/* Skeleton Loading Effects for Compare Modal */
.compare-modal .skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    min-height: 245px;
}

.compare-modal .weather-table.skeleton-loading {
    min-height: 210px !important;
}

.compare-modal .weather-table-column-title.skeleton-loading {
    min-height: 40px;
}


/* Skeleton cho các thẻ dữ liệu trong nowcast modal - chỉ cho dashboard */
.nowcast-modal-params .param-value.skeleton-text {
    min-width: 80px;
    height: 1.5em;
}

.current-weather-temp.skeleton-text,
.current-weather-desc.skeleton-text {
    min-width: 100px;
    height: 1.5em;
    margin: 5px 0;
}

.nowcast-warning-desc-text.skeleton-text {
    min-width: 200px;
    height: 1.2em;
}

.recommend-title-text.skeleton-text,
.recommend-desc.skeleton-text {
    min-width: 150px;
    height: 1.2em;
    margin: 5px 0;
}

.nowcast-modal-chart-wrap {
    padding: 0px 16px 0 32px;
}

/* === Nowcast modal header customizations (past) === */
.nowcast-modal-main-header .data-time-label {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    color: #1f2937;
}

.nowcast-modal-main-header .nowcast-data-range-input {
    height: 36px;
    padding: 6px 36px 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px 18px;
}

.nowcast-modal-main-header .nowcast-data-range-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

.nowcast-modal-main-header .nowcast-data-range-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Draw Polygon Popup Styles */
.draw-polygon-popup {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.draw-polygon-popup-header {
    color: #242C36;
}

.draw-polygon-popup-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.draw-polygon-popup-content {
    padding: 8px;
}

.draw-polygon-popup-content-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.draw-polygon-popup-content-item:last-child {
    margin-bottom: 0;
    flex-direction: column;
    align-items: stretch;
}

.draw-polygon-popup-content-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
}

.draw-polygon-popup-content-item-value {
    font-size: 14px;
    font-weight: 600;
    color: #4A90E2;
}

.draw-polygon-popup-content-item-value input {
    width: 100%;
}

.draw-polygon-popup-content-item:last-child .draw-polygon-popup-content-item-value {
    width: 100%;
    margin-top: 8px;
}

.draw-polygon-popup-content-item input.form-control {
    width: 100%;
    padding: 20px 12px;
    color: #3D4F62;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #E8EEF0;
}

.draw-polygon-popup-content-item input.form-control:focus {
    outline: none;
    border-color: #80B541;
    box-shadow: 0 0 0 3px rgba(155, 226, 74, 0.1);
}

.draw-polygon-popup-content-item input.form-control::placeholder {
    color: #8899A6;
    font-style: italic;
}

.draw-polygon-popup-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 5px;
    background: #FFFFFF;
    border-top: 1px solid #E1E8ED;
}

.draw-polygon-popup-footer-item {
    flex: 1;
}

.draw-polygon-popup-footer-item .btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.draw-polygon-popup-footer-item .btn-danger {
    background: #ffffff;
    color: #80B541;
    border: 1px solid #80B541;
}

.draw-polygon-popup-footer-item .btn-danger:hover {
    background: #f2f8e8 !important;
    border-color: #80B541 !important;
    color: #80B541;
}

.draw-polygon-popup-footer-item .btn-danger:active {
    background: #e6f1d6 !important;
    border-color: #80B541 !important;
    color: #80B541;
}

.draw-polygon-popup-footer-item .btn-danger:focus {
    outline: none;
    border-color: #80B541 !important;
    box-shadow: 0 0 0 3px rgba(128, 181, 65, 0.25) !important;
}

.draw-polygon-popup-footer-item .btn-success {
    background: #80B541;
    color: #ffffff !important;
}

.draw-polygon-popup-footer-item .btn-success:hover {
    background: #6fa034 !important;
    transform: translateY(-1px);
}

.draw-polygon-popup-footer-item .btn-success:active {
    background: #5c8a2b !important;
}

.draw-polygon-popup-footer-item .btn-success:focus {
    outline: none;
    border-color: #80B541 !important;
    box-shadow: 0 0 0 3px rgba(128, 181, 65, 0.3);
}

.draw-polygon-popup-footer-item .btn-primary {
    background: #27AE60 !important;
    color: #ffffff;
}

.draw-polygon-popup-footer-item .btn-primary:hover {
    background: #1f8f4d !important;
    transform: translateY(-1px);
}

.draw-polygon-popup-footer-item .btn-primary:active {
    background: #1f8f4d !important;
}

.draw-polygon-popup-footer-item .btn-primary:focus {
    outline: none;
    background: #1f8f4d !important;
    border-color: #80B541 !important;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.28);
}

.leaflet-popup-content {
    min-width: 368px !important;
}

/* Tablet Responsive */
@media (max-width: 768px) {
    .draw-polygon-popup {
        min-width: 260px;
        max-width: 300px;
    }

    .draw-polygon-popup-title {
        font-size: 15px;
    }

    .draw-polygon-popup-content {
        padding: 8px;
    }

    .draw-polygon-popup-content-item {
        margin-bottom: 10px;
        padding: 6px 0;
    }

    .draw-polygon-popup-content-item-title,
    .draw-polygon-popup-content-item-value {
        font-size: 13px;
    }

    .draw-polygon-popup-content-item input.form-control {
        padding: 8px 10px;
        font-size: 13px;
    }

    .draw-polygon-popup-footer {
        padding: 12px 16px;
        gap: 6px;
    }

    .draw-polygon-popup-footer-item .btn {
        padding: 7px 10px;
        font-size: 12px;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {

    .leaflet-popup-content {
        min-width: 240px !important;
    }


    .draw-polygon-popup {
        min-width: 240px;
        max-width: 280px;
    }

    .draw-polygon-popup-title {
        font-size: 14px;
    }

    .draw-polygon-popup-content {
        padding: 14px;
    }

    .draw-polygon-popup-content-item {
        margin-bottom: 8px;
        padding: 4px 0;
    }

    .draw-polygon-popup-content-item-title,
    .draw-polygon-popup-content-item-value {
        font-size: 12px;
    }

    .draw-polygon-popup-content-item input.form-control {
        padding: 8px 10px;
        font-size: 12px;
        margin: 4px 0;
    }

    .draw-polygon-popup-footer {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 4px;
        padding: 10px 8px;
    }

    .draw-polygon-popup-footer-item {
        flex: 1;
    }

    .draw-polygon-popup-footer-item .btn {
        padding: 8px 6px;
        font-size: 11px;
        font-weight: 500;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {

    .leaflet-popup-content {
        min-width: 220px !important;
    }

    .draw-polygon-popup {
        min-width: 220px;
        max-width: 260px;
    }

    .draw-polygon-popup-title {
        font-size: 13px;
    }

    .draw-polygon-popup-content {
        padding: 12px;
    }

    .draw-polygon-popup-content-item {
        margin-bottom: 6px;
    }

    .draw-polygon-popup-content-item-title,
    .draw-polygon-popup-content-item-value {
        font-size: 11px;
    }

    .draw-polygon-popup-content-item input.form-control {
        padding: 6px 8px;
        font-size: 11px;
    }

    .draw-polygon-popup-footer {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 6px;
        gap: 3px;
    }

    .draw-polygon-popup-footer-item {
        flex: 1;
    }

    .draw-polygon-popup-footer-item .btn {
        padding: 7px 4px;
        font-size: 10px;
        font-weight: 500;
    }
}

.nowcast-modal-24h-title-text {
    padding-left: 32px;
    font-size: 20px;
    font-weight: 700;
    color: #242C36;
}

@media (max-width: 767px) {
    .nowcast-modal-header-bottom {
        flex-direction: column;
    }

    .nowcast-modal-24h-title-text {
        font-size: 12px;
    }

    .nowcast-highchart-wrap {
        flex-direction: column;
        width: 100%;
    }

    .nowcast-highchart-wrap [id^="nowcast-highchart-"] {
        width: 100% !important;
        min-width: 0;
    }

    .nowcast-highchart-legend {
        min-width: 180px !important;
        height: 290px !important;
    }
}

/* Header-right button styling */
.header-right {
    min-height: 48px;
    align-items: center;
    min-width: 300px;
    flex-shrink: 0;
}

.header-right .btn {
    width: calc(33.333% - 5.33px);
    border-radius: 8px;
    border: none;
    padding: 10px 21px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.header-right .btn.active {
    background-color: #80B541;
    color: #ffffff;
}

.header-right .btn:not(.active) {
    background-color: #F6F8FB;
    color: #3D4F62;
}

.header-right .btn:not(.active):hover {
    background-color: #E8EEF0;
    color: #3D4F62;
}

.header-right .btn.active:hover {
    background-color: #6fa12e;
    color: #ffffff;
}

/* Responsive styling for header-right buttons */
@media (max-width: 768px) {
    .header-right {
        min-height: 42px;
        min-width: 250px;
    }

    .header-right .btn {
        width: calc(33.333% - 4px);
        padding: 8px 12px;
        font-size: 12px;
        min-height: 32px;
    }
}

@media (max-width: 480px) {
    .header-right {
        min-height: 38px;
        min-width: 200px;
    }

    .header-right .btn {
        width: calc(33.333% - 3px);
        padding: 6px 8px;
        font-size: 11px;
        min-height: 28px;
    }
}

/* Weather Data Past Content Styles */
.weather-data-past-content {
    margin-bottom: 20px;
    padding: 20px;
}

/* Weather Data Past Time Input Styles */
.weather-data-past-time-input {
    background-color: #F6F8FB !important;
    border: 1px solid #E1E5E9 !important;
    cursor: pointer !important;
}

.weather-data-past-time-input:focus {
    background-color: #F6F8FB !important;
    border-color: #4D459B !important;
    box-shadow: 0 0 0 0.2rem rgba(77, 69, 155, 0.25) !important;
}

.weather-data-past-time-input::placeholder {
    color: #999;
    font-style: italic;
}

/* Flatpickr Custom Styling */
.flatpickr-calendar {
    background: white;
    border: 1px solid #E1E5E9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: inherit;
}

.flatpickr-calendar.open {
    z-index: 1000;
}

.flatpickr-calendar .flatpickr-month {
    background: #F8F9FA;
    border-bottom: 1px solid #E1E5E9;
    border-radius: 8px 8px 0 0;
}

.flatpickr-calendar .flatpickr-weekday {
    background: #F8F9FA;
    color: #666;
    font-weight: 500;
}

.flatpickr-calendar .flatpickr-day {
    border-radius: 4px;
    margin: 1px;
}

.flatpickr-calendar .flatpickr-day:hover {
    background: #E9ECEF;
    border-color: #E9ECEF;
}

.flatpickr-calendar .flatpickr-day.selected {
    background: #4D459B;
    border-color: #4D459B;
    color: white !important;
}

.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
    background: #4D459B;
    border-color: #4D459B;
    color: white;
}

.flatpickr-calendar .flatpickr-day.inRange {
    background: rgba(77, 69, 155, 0.1);
    border-color: rgba(77, 69, 155, 0.1);
    color: #4D459B;
}

.flatpickr-calendar .flatpickr-day.today {
    border-color: #4D459B;
    color: #4D459B;
    font-weight: 600;
}

.flatpickr-calendar .flatpickr-day.today:hover {
    background: #4D459B;
    color: white;
}

.flatpickr-calendar .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-next-month {
    color: #666;
}

.flatpickr-calendar .flatpickr-prev-month:hover,
.flatpickr-calendar .flatpickr-next-month:hover {
    color: #4D459B;
}

.flatpickr-calendar .flatpickr-current-month {
    color: #333;
    font-weight: 600;
}

/* Year picker container styling */
.year-picker-container {
    min-width: 300px;
    position: relative;
    z-index: 1001;
}

.year-picker-container h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.year-picker-container select {
    background-color: #F6F8FB;
    border: 1px solid #E1E5E9;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1002;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
}

.year-picker-container select:focus {
    outline: none;
    border-color: #4D459B;
    box-shadow: 0 0 0 0.2rem rgba(77, 69, 155, 0.25);
}

.year-picker-container select option {
    background-color: white;
    color: #333;
    padding: 8px 12px;
}

.year-picker-container button {
    transition: all 0.2s ease;
    position: relative;
    z-index: 1002;
}

.year-picker-container button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.year-picker-container button:active {
    transform: translateY(0);
}

/* Ensure calendar has proper z-index */
.flatpickr-calendar {
    z-index: 1000 !important;
}

.flatpickr-calendar.open {
    z-index: 1000 !important;
}

/* Mobile responsive for Flatpickr */
@media (max-width: 768px) {
    .flatpickr-calendar {
        width: 280px;
        left: -10px !important;
    }

    .flatpickr-calendar .flatpickr-day {
        height: 32px;
        line-height: 32px;
    }
}

/* Radar overlay transition styles */
.radar-overlay-smooth {
    transition: opacity 0.3s ease-in-out !important;
}

.radar-overlay-smooth img {
    transition: opacity 0.3s ease-in-out !important;
}

.menu-item .active {
    text-decoration: none;
}

/* Popup open animation used by farm and station popups */
.leaflet-popup-content-wrapper.popup-animate-open,
.leaflet-popup-content-wrapper.popup-animate-open .station-popup {
    animation: popupFadeIn 260ms ease-out;
}
@keyframes popupFadeIn {
    0% { transform: translateY(6px) scale(0.98); opacity: 0; }
    60% { transform: translateY(-2px) scale(1.02); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.accumulation-range {
    font-size: 12px;
    color: #fff;
    font-weight: 400;
    display: none;
}

.connector-dot-overlay {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid black;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
}

#plugin-satellite {
    display: none !important;
}
/* Nowcast notification modal styles - match page tone (primary orange + blue accents) */
    :root{
        --nowcast-primary: #4D459B; /* purple */
        --nowcast-accent: #2A7CF8; /* blue */
        --nowcast-bg: #F6F8FB;
        --nowcast-border: rgba(42,124,248,0.08);
        --nowcast-radius: 12px;
    }
    #nowcastNotificationModal .modal-content{
        border-radius: var(--nowcast-radius);
        background: linear-gradient(180deg, #ffffff 0%, var(--nowcast-bg) 100%);
        box-shadow: 0 10px 30px rgba(42,76,120,0.08);
        border: 1px solid var(--nowcast-border);
        overflow: hidden;
    }
    #nowcastNotificationModal .modal-header{
        background: linear-gradient(90deg, rgba(77,69,155,0.06), rgba(42,124,248,0.04));
        border-bottom: none;
        padding: 18px 20px;
    }
    #nowcastNotificationModal .modal-title{
        color: #2b3440;
        font-weight: 700;
        font-size: 18px;
        margin: 0;
    }
    #nowcastNotificationModal .close{
        color: #425066;
        opacity: 0.9;
    }
    #nowcastNotificationModal .modal-body{
        padding: 18px 20px;
        color: #4b5966;
        font-size: 14px;
    }
    #nowcastNotificationModal .form-group label{
        display:block;
        margin-bottom:6px;
        font-weight:600;
        color:#344050;
        font-size:13px;
    }
    #nowcastNotificationModal .form-control{
        border:1px solid rgba(34,47,62,0.08);
        border-radius:8px;
        padding:10px 12px;
        box-shadow:none;
        transition:box-shadow .15s ease, border-color .15s ease;
    }
    #nowcastNotificationModal .form-control:focus{
        border-color: var(--nowcast-primary);
        box-shadow: 0 0 0 4px rgba(77,69,155,0.06);
        outline: none;
    }
    #nowcastNotificationModal .modal-footer{
        border-top: none;
        padding: 14px 20px;
        display:flex;
        justify-content:flex-end;
        gap:8px;
        background:transparent;
    }
    #nowcastNotificationModal .btn-primary{
        background: var(--nowcast-primary);
        border-color: var(--nowcast-primary);
        color: #fff;
        font-weight:600;
        padding:8px 16px;
        border-radius:8px;
    }
    #nowcastNotificationModal .btn-primary:hover{
        background: #fff;;
        border-color:#4D459B;
        color: #4D459B;
        border-color: var(--nowcast-primary);
        box-shadow: 0 0 0 4px rgba(77,69,155,0.06);
        outline: none
    }
    #nowcastNotificationModal .btn-secondary{
        background:transparent;
        border:1px solid rgba(66,80,102,0.08);
        color:#425066;
        padding:8px 14px;
        border-radius:8px;
    }
    /* Small screens adjustments */
    @media (max-width:576px){
        #nowcastNotificationModal .modal-dialog{ max-width: 92%; }
        #nowcastNotificationModal .modal-title{ font-size:16px }
        #nowcastNotificationModal .modal-body{ font-size:13px }
    }

/* Climate Summary Tab Styles */
.climate-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 32px;
    border-bottom: 1px solid #E1E5E9;
    background: #FFFFFF;
}

.climate-summary-header-left {
    flex: 1;
}

.climate-summary-title {
    font-size: 24px;
    font-weight: 700;
    color: #1A1D29;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.climate-summary-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #5E6E7D;
    margin: 0;
    line-height: 1.4;
}

.climate-summary-header-right {
    display: flex;
    align-items: center;
    margin-left: 24px;
}

.climate-summary-header-right .btn-share {
    white-space: nowrap;
    transition: all 0.2s ease;
}

.climate-summary-header-right .btn-share:hover {
    background: #E1E5E9 !important;
    border-color: #99A8B7 !important;
}

.climate-summary-container {
    padding: 20px;
    padding-bottom: 40px;
    max-height: 100vh;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Bootstrap grid compatibility - sections now use col-md-6 */
.temperature-section,
.humidity-section,
.radiation-section,
.wind-section {
    padding: 20px;
    background: #F6F8FB;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    height: 100%;
}

@media (min-width: 768px) {
    .temperature-section,
    .humidity-section,
    .radiation-section,
    .wind-section {
        margin-bottom: 0;
    }
    
    .climate-section .row > [class*="col-md-6"]:first-child {
        padding-right: 10px;
    }
    
    .climate-section .row > [class*="col-md-6"]:last-child {
        padding-left: 10px;
    }
}

/* Full width sections */
.rainfall-section,
.cultivation-section,
.planting-time-section {
    padding: 20px;
    background: #F6F8FB;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.climate-section {
    margin-bottom: 20px;
}

.climate-section:last-child {
    padding-bottom: 20px;
}

.climate-section .row {
    margin-left: 0;
    margin-right: 0;
}

.climate-section .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

.climate-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
}

.climate-section-title .title-text {
    font-size: 18px;
    font-weight: 600;
    color: #1A1D29;
    flex: 0 0 auto;
}

.climate-section-title .title-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 auto;
}

.climate-section-title .title-stats .stat-label {
    font-size: 14px;
    color: #5E6E7D;
    font-weight: 400;
}

.climate-section-title .title-stats .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1A1D29;
}

.climate-section-title .title-stats .stat-value .sub-stat-value {
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px;
}

.climate-section-title .title-stats .stat-value .sub-stat-value.positive {
    color: #0FB869;
}

.climate-section-title .title-stats .stat-value .sub-stat-value.negative {
    color: #DD1212;
}

.climate-chart-container {
    height: 300px;
    margin-bottom: 16px;
    position: relative;
    width: 100%;
    min-height: 200px;
}

.climate-chart-container .highcharts-container {
    width: 100% !important;
    height: 100% !important;
}

.climate-stats {
    margin-bottom: 16px;
}

.climate-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #F6F8FB;
    border-radius: 8px;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #5E6E7D;
    font-weight: 500;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #1A1D29;
}

/* Temperature Breakdown */
.temperature-breakdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.breakdown-item {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
}

.breakdown-item:nth-child(1) {
    background: #E0EAF8;
}

.breakdown-item:nth-child(2) {
    background: #DEF2EB;
}

.breakdown-item:nth-child(3) {
    background: #F7ECE3;
}

.breakdown-item:nth-child(4) {
    background: #F6EEF1;
}

.breakdown-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #5E6E7D;
    margin-bottom: 4px;
}

.breakdown-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1A1D29;
}

/* Humidity Assessment */
.humidity-assessment {
    margin-top: 16px;
}

.assessment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.assessment-label {
    font-size: 14px;
    color: #374151;
    flex: 0 0 auto;
    padding-left: 15px;
}

.assessment-status {
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    flex: 0 0 auto;
}

.assessment-item.optimal {
    background: #DEF2EB;
}

.assessment-item.optimal .assessment-status {
    color: #00B45F;
}

.assessment-item.high {
    background: #F7ECE3;
}

.assessment-item.high .assessment-status {
    color: #FD851C;
}
/* Season Info - Now uses Bootstrap grid */
.season-info {
    margin-top: 16px;
    margin-left: 0;
    margin-right: 0;
}

.season-info > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 12px;
}

.season-item {
    padding: 12px;
    background: #F6F8FB;
    border-radius: 8px;
    height: 100%;
}

.season-label {
    display: block;
    font-size: 12px;
    color: #5E6E7D;
    margin-bottom: 4px;
}

.season-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1A1D29;
}

/* Extreme Events */
.extreme-events {
    margin-top: 16px;
    padding: 12px;
    background: #FFF3CD;
    border-radius: 16px;
}

.extreme-events-text {
    font-size: 14px;
    color: #856404;
    margin: 0;
    line-height: 1.5;
}

/* Sunshine Hours */
.sunshine-hours {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.sunshine-item {
    padding: 12px;
    background: #F6F8FB;
    border-radius: 8px;
    text-align: center;
}

.sunshine-label {
    display: block;
    font-size: 12px;
    color: #5E6E7D;
    margin-bottom: 4px;
}

.sunshine-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1A1D29;
}

/* Wind Stats */
.wind-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.wind-stat-item {
    padding: 12px;
    background: #F6F8FB;
    border-radius: 8px;
}

.wind-stat-label {
    display: block;
    font-size: 12px;
    color: #5E6E7D;
    margin-bottom: 4px;
}

.wind-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1A1D29;
}

/* Typhoon Info */
.typhoon-info {
    margin-top: 16px;
}

.typhoon-item {
    padding: 12px;
    background: #F6F8FB;
    border-radius: 8px;
    margin-bottom: 8px;
}

.typhoon-label {
    display: block;
    font-size: 12px;
    color: #5E6E7D;
    margin-bottom: 4px;
}

.typhoon-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1A1D29;
}

/* Cultivation Recommendations */
.cultivation-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.cultivation-category {
    padding: 16px;
    background: #F6F8FB;
    border-radius: 8px;
}

.category-title {
    font-size: 14px;
    font-weight: 600;
    color: #1A1D29;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.crop-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crop-item {
    padding: 8px 12px;
    background: #FFFFFF;
    border-radius: 6px;
    font-size: 13px;
    color: #5E6E7D;
    border: 1px solid #E1E5E9;
}

/* Planting Timeline */
.planting-timeline-container {
    margin-top: 16px;
}

.planting-timeline {
    margin-bottom: 24px;
}

.timeline-label {
    font-size: 14px;
    font-weight: 600;
    color: #1A1D29;
    margin-bottom: 12px;
}

.timeline-months {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    position: relative;
    padding-bottom: 24px;
}

.timeline-month {
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: #FFFFFF;
    position: relative;
}

.timeline-month.optimal {
    background: #28a745;
}

.timeline-month.moderate {
    background: #ffc107;
}

.timeline-month.unsuitable {
    background: #dc3545;
}

.timeline-month-label {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    font-size: 10px;
    color: #5E6E7D;
    text-align: center;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .climate-summary-header {
        flex-direction: column;
        padding: 16px 20px;
        gap: 16px;
    }

    .climate-summary-header-left {
        width: 100%;
    }

    .climate-summary-title {
        font-size: 20px;
    }

    .climate-summary-subtitle {
        font-size: 14px;
    }

    .climate-summary-header-right {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
    }

    .climate-summary-container {
        padding: 12px;
        padding-bottom: 32px;
    }

    .temperature-section,
    .humidity-section,
    .radiation-section,
    .wind-section {
        margin-bottom: 16px;
    }

    .climate-section {
        margin-bottom: 16px;
    }

    .temperature-section,
    .humidity-section,
    .radiation-section,
    .wind-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .rainfall-section,
    .cultivation-section,
    .planting-time-section {
        padding: 16px;
    }

    .temperature-breakdown {
        grid-template-columns: repeat(2, 1fr);
    }

    .season-info > [class*="col-"] {
        margin-bottom: 12px;
    }

    .sunshine-hours {
        grid-template-columns: 1fr;
    }

    .wind-stats {
        grid-template-columns: 1fr;
    }

    .cultivation-categories {
        grid-template-columns: 1fr;
    }

    .timeline-months {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 480px) {
    .climate-summary-header {
        padding: 12px 16px;
    }

    .climate-summary-title {
        font-size: 18px;
    }

    .climate-summary-subtitle {
        font-size: 13px;
    }

    .climate-summary-header-right .btn-share {
        padding: 6px 12px;
        font-size: 13px;
    }

    .climate-chart-container {
        height: 200px;
        min-height: 180px;
    }

    .temperature-breakdown {
        grid-template-columns: 1fr;
    }

    .timeline-months {
        grid-template-columns: repeat(4, 1fr);
    }

    .planting-time-table-wrapper {
        -webkit-overflow-scrolling: touch;
    }

    .planting-time-table {
        min-width: 500px;
    }
}

/* Responsive for very small iframes */
@media (max-width: 400px) {
    .climate-summary-container {
        padding: 12px;
        padding-bottom: 32px;
        gap: 12px;
    }

    .climate-section {
        padding: 12px;
    }

    .climate-chart-container {
        height: 180px;
        min-height: 160px;
    }

    .planting-time-table {
        min-width: 450px;
    }

    .climate-section-title .title-text {
        font-size: 16px;
    }

    .climate-section-title .title-stats .stat-value {
        font-size: 16px;
    }
}

/* Wind chart container layout */
.wind-section .wind-chart-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.wind-section .wind-chart-wrapper {
    flex: 0 0 65%;
    width: 65%;
}

/* Calculate height for climate-wind-chart dynamically */
.wind-section #climate-wind-chart {
    height: calc(300px + 16px + 72px); /* climate-radiation-chart (300px) + margin-bottom (16px) + extreme-events (~72px: padding 24px + content ~48px) */
}

.wind-section .climate-wind-stats {
    flex: 0 0 35%;
    width: 35%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wind-section .wind-stats {
    margin-top: 0;
    grid-template-columns: 1fr;
}

.wind-section .typhoon-info {
    margin-top: 0;
}

/* Season info layout - Bootstrap grid compatible */
.season-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.season-icon {
    font-size: 16px;
    color: #1976D2;
    flex-shrink: 0;
}

.season-value {
    font-size: 14px;
    font-weight: 600;
    color: #1A1D29;
    margin: 0;
}

/* Extreme events styling */
.extreme-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.extreme-events-title {
    font-size: 14px;
    font-weight: 700;
    color: #FC9235;
    margin: 0;
}

.extreme-events-text {
    font-size: 14px;
    color: #6C7682;
    margin: 0;
}

/* Radiation section extreme events styling */
.radiation-section .extreme-events {
    background: #E0EAF8;
    padding: 12px;
    border-radius: 16px;
}

.radiation-section .extreme-events-title {
    color: #2A7CF8;
}

/* Crop list styling */
.crop-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.crop-item {
    border-radius: 16px;
    width: auto;
    display: inline-block;
}

/* Planting time table styling */
.planting-time-table-container {
    margin-top: 16px;
}

.planting-time-table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.planting-time-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
}

.planting-time-table th {
    padding: 12px 8px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #1A1D29;
    background: #FFFFFF;
    border: 1px solid #FFFFFF;
}

.planting-time-table th:first-child {
    padding-left: 16px;
    width: 100px;
    min-width: 100px;
}

.planting-time-table th.table-header-month {
    padding-left: 8px;
}

.planting-time-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #FFFFFF;
}

.planting-time-table td.table-cell-crop {
    text-align: left;
    padding-left: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1A1D29;
    width: 100px;
    min-width: 100px;
}

.planting-time-table td.table-cell-month {
    width: calc(100% / 12);
    padding: 12px 8px;
    vertical-align: middle;
}

.planting-time-table td.table-cell-month .month-indicator {
    height: 16px;
    border-radius: 2px;
    margin: 0 auto;
}

.planting-time-table td.table-cell-month .month-indicator.optimal {
    background: #28a745;
}

.planting-time-table td.table-cell-month .month-indicator.moderate {
    background: #ffc107;
}

.planting-time-table td.table-cell-month .month-indicator.unsuitable {
    background: #dc3545;
}

@media (max-width: 768px) {
    .wind-section .wind-chart-container {
        flex-direction: column;
    }
    
    .wind-section .wind-chart-wrapper,
    .wind-section .climate-wind-stats {
        flex: 1 1 100%;
        width: 100%;
    }
    
    /* Season info uses Bootstrap grid - col-12 on mobile, col-md-6 on tablet, col-lg-4 on desktop */

    .planting-time-table-wrapper {
        margin: 0 -12px;
        padding: 0 12px;
    }

    .planting-time-table {
        min-width: 550px;
    }
}

/* Ensure body and html take full width in iframe */
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Custom checkbox styles - khi checked thì dấu tích và viền là màu #4D459B, nền bên trong màu trắng */
.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #8A9CAB;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked {
    background-color: white;
    border-color: #4D459B;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #4D459B;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}