/* HKO Weather Terminal - Widget Styles */

.hko-widget-container {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Current Display Section */
.hko-current-display {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.hko-current-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.hko-current-header .hko-label {
    font-weight: bold;
    color: #87ceeb;
}

.hko-current-header .hko-update-time {
    font-size: 13px;
    color: #b0e0e6;
}

.hko-current-values {
    display: flex;
    align-items: center;
}

.hko-current-reading {
    font-size: 15px;
    color: #e0e0e0;
}

.hko-current-reading strong {
    color: #fff;
    font-weight: 600;
}

/* Records List */
.hko-records-container {
    margin-bottom: 20px;
}

.hko-records-list {
    max-height: none;
    overflow-y: visible;
}

.hko-record-item {
    display: flex;
    align-items: flex-start;
    padding: 0;
    font-size: 13px; 
}

.hko-record-item:last-child {
    margin-bottom: 0;
}

.hko-record-time {
    color: #87ceeb;
    font-weight: 600;
    margin-right: 8px;
    font-size: 12px;
    flex-shrink: 0;
}

.hko-record-data {
    color: #e0e0e0;
    word-break: break-word;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.hko-col {
    display: inline-block;
    min-width: 50px; 
    margin-right: 4px;
}

.hko-record-data strong {
    color: #fff;
    font-weight: 600;
}

/* Statistics Display */
.hko-stats-display {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.hko-stats-items {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.hko-stat-item {
    font-size: 12px;
    color: #e0e0e0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    line-height: 1.5;
}

/* Historical Stats Display - Responsive Grid */
.hko-historical-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px !important;
    padding: 15px !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
}

.hko-stats-date {
    border-left: 4px solid;
    padding-left: 10px !important;
    margin-bottom: 0 !important;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px !important;
    padding-left: 12px !important;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hko-stats-date-header {
    color: inherit;
    font-weight: bold !important;
    margin-bottom: 0 !important;
    font-size: 13px;
}

.hko-stats-maxmin {
    margin-bottom: 0 !important;
    color: #fff !important;
    font-size: 11px;
    line-height: 1.5;
}

.hko-stats-times {
    color: #ccc !important;
    font-size: 10px !important;
    line-height: 1.4;
    word-break: break-word;
}

/* Chart Section */
.hko-chart-section {
    margin-bottom: 20px;
}

.hko-charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    grid-auto-flow: row;
}

.hko-chart-wrapper {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.hko-chart-wrapper h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #87ceeb;
    font-weight: 600;
}

.hko-chart {
    width: 100%;
    height: 280px;
    flex-grow: 1;
}

.hko-chart-sparse {
    grid-column: span 1;
}

.hko-chart-sparse-data {
    height: 280px;
}

/* Loading & Error */
.hko-loading {
    text-align: center;
    padding: 20px;
    color: #87ceeb;
    font-size: 14px;
}

.hko-error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ff6b6b;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.hko-error p {
    margin: 0;
    font-size: 13px;
}

.hko-no-data {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* Footer Info */
.hko-footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #b0e0e6;
    flex-wrap: wrap;
    gap: 10px;
}

.hko-footer-left {
    order: 1;
}

.hko-footer-center {
    order: 2;
    flex: 1;
    text-align: center;
}

.hko-footer-right {
    order: 3;
}

.hko-tier-info {
    display: inline-block;
    min-width: 250px;
}

.hko-more-link {
    color: #87ceeb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.hko-more-link:hover {
    color: #fff;
}

.hko-chart-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    color: #87ceeb;
}

.hko-chart-label input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
}

/* Guest Chart Label - Disabled State */
.hko-chart-label.hko-chart-label-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #999;
}

.hko-chart-label.hko-chart-label-disabled input[type="checkbox"] {
    cursor: not-allowed;
    opacity: 0.5;
}

.hko-chart-label.hko-chart-label-disabled input[type="checkbox"]:disabled {
    opacity: 0.5;
}

/* Sign In Link */
.hko-signin-link {
    color: #87ceeb;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.hko-signin-link:hover {
    color: #b0e0e6;
    text-decoration: underline;
}

.hko-upgrade-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.3s ease;
}

.hko-upgrade-link:hover {
    color: #FFA500;
}

.hko-last-update {
    margin-left: 4px;
    color: #b0e0e6;
}

/* Scrollbar Styling */
.hko-records-list::-webkit-scrollbar {
    width: 6px;
}

.hko-records-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.hko-records-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.hko-records-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hko-widget-container {
        padding: 15px;
    }

    .hko-current-reading {
        font-size: 13px;
    }

    .hko-col {
        min-width: 60px;
        font-size: 12px;
    }

    .hko-chart {
        height: 250px;
    }

    .hko-charts-container {
        grid-template-columns: 1fr;
    }

    .hko-footer-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .hko-footer-left,
    .hko-footer-center,
    .hko-footer-right {
        order: unset;
    }

    /* Mobile: 1 column for stats */
    .hko-historical-stats {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 12px !important;
    }

    .hko-stats-date {
        padding: 10px !important;
        padding-left: 10px !important;
        gap: 6px;
    }

    .hko-stats-date-header {
        font-size: 12px;
    }

    .hko-stats-maxmin {
        font-size: 10px;
    }

    .hko-stats-times {
        font-size: 9px !important;
    }
}

/* Tablet Responsive (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hko-historical-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Desktop Responsive (1025px+) */
@media (min-width: 1025px) {
    .hko-historical-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Highcharts Customization */
.highcharts-container {
    width: 100% !important;
}

.highcharts-title {
    display: none;
}

.highcharts-legend {
    display: none;
}

/* ===== HISTORICAL WIDGET STYLES ===== */

/* History Selection Display */
.hko-history-selection {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.hko-history-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.hko-history-title .hko-label {
    font-weight: bold;
    color: #87ceeb;
    font-size: 15px;
}

.hko-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.hko-history-header .hko-label-secondary {
    font-weight: 600;
    color: #b0e0e6;
    font-size: 12px;
}

.hko-history-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hko-history-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #e0e0e0;
    user-select: none;
}

.hko-history-option input[type="radio"] {
    margin-right: 6px;
    cursor: pointer;
    accent-color: #87ceeb;
    width: 16px;
    height: 16px;
}

.hko-history-option:hover {
    color: #87ceeb;
}

.hko-history-toggle {
    display: flex;
    align-items: center;
}

.hko-history-toggle .hko-chart-label {
    margin: 0;
}

.hko-history-toggle-checkbox {
    margin-right: 6px;
    cursor: pointer;
    accent-color: #87ceeb;
    width: 16px;
    height: 16px;
}

/* Mobile Responsive for Historical Widget */
@media (max-width: 768px) {
    .hko-history-options {
        flex-direction: column;
        gap: 8px;
    }

    .hko-history-option {
        font-size: 12px;
    }

    .hko-history-title {
        font-size: 14px;
    }

    .hko-history-header .hko-label-secondary {
        font-size: 11px;
    }
}