/* WSSS Weather Terminal - Widget Styles */

/* ===== CONTAINER & TITLE ===== */

.wsss-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;
}

.wsss-widget-title {
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(135, 206, 235, 0.5);
    padding-bottom: 10px;
}

.wsss-widget-title h3 {
    margin: 0;
    font-size: 18px;
    color: #87ceeb;
    font-weight: 600;
}

/* ===== DATE TABS ===== */

.wsss-records-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(135, 206, 235, 0.3);
    flex-wrap: wrap;
}

.wsss-records-tab-btn {
    padding: 6px 12px;
    background: rgba(135, 206, 235, 0.1);
    border: 1px solid rgba(135, 206, 235, 0.3);
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    color: #87ceeb;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wsss-records-tab-btn:hover {
    background: rgba(135, 206, 235, 0.2);
    color: #b0e0e6;
}

.wsss-records-tab-btn.wsss-records-tab-active {
    background: rgba(135, 206, 235, 0.3);
    border-color: #87ceeb;
    color: #b0e0e6;
    border-bottom: 2px solid #87ceeb;
}

/* ===== WEATHER LAYOUT: METAR 30% / CHANGI 70% ===== */

.wsss-weather-container {
    display: grid;
    grid-template-columns: 0.3fr 0.7fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wsss-weather-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #87ceeb;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.wsss-box-header {
    border-bottom: 1px solid rgba(135, 206, 235, 0.3);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.wsss-box-header h4 {
    margin: 0;
    font-size: 14px;
    color: #87ceeb;
    font-weight: 600;
}

/* ===== STATION GRID: Station_1 to Station_6 (2 columns) ===== */

.wsss-station-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wsss-station-box {
    /* station boxes share .wsss-weather-box styling */
}

/* ===== RECORDS LIST ===== */

.wsss-records-list {
    max-height: 400px;
    overflow-y: auto;
    flex: 1;
}

.wsss-record-item {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2px;
    font-size: 12px;
    color: #e0e0e0;
    margin-bottom: 2px;
    line-height: 1.4;
    word-break: break-word;
}

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

.wsss-record-location,
.wsss-record-time {
    color: #87ceeb;
    font-weight: 600;
    font-size: 11px;
    flex-shrink: 0;
}

.wsss-record-location {
    min-width: 35px;
}

.wsss-col {
    display: inline-block;
    min-width: 35px;
    font-size: 11px;
    padding: 1px 2px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.wsss-record-item strong {
    color: #fff;
    font-weight: 600;
}

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

.wsss-records-list::-webkit-scrollbar {
    width: 6px;
}

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

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

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

/* ===== LOADING & ERROR ===== */

.wsss-loading {
    text-align: center;
    padding: 20px;
    color: #87ceeb;
    font-size: 14px;
    display: none;
}

.wsss-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;
}

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

/* ===== FOOTER ===== */

.wsss-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;
}

.wsss-tier-info {
    display: inline-block;
}

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

.wsss-more-link {
    color: #87ceeb;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 3px;
    background: rgba(135, 206, 235, 0.1);
    display: inline-block;
    transition: all 0.3s ease;
}

.wsss-more-link:hover {
    color: #fff;
    background: rgba(135, 206, 235, 0.2);
}

/* ===== EXTERNAL LINKS ===== */

.wsss-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wsss-links-column {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #87ceeb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wsss-links-title {
    border-bottom: 1px solid rgba(135, 206, 235, 0.3);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.wsss-links-title h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #87ceeb;
}

.wsss-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wsss-links-list-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.wsss-links-list li {
    margin: 0;
    padding: 0;
}

.wsss-links-list a {
    display: inline-block;
    color: #87ceeb;
    text-decoration: none;
    font-size: 11px;
    padding: 6px 8px;
    border-radius: 3px;
    background: rgba(135, 206, 235, 0.1);
    border: 1px solid rgba(135, 206, 235, 0.2);
    white-space: nowrap;
    word-break: break-word;
    transition: all 0.3s ease;
}

.wsss-links-list a:hover {
    background: rgba(135, 206, 235, 0.2);
    color: #b0e0e6;
    border-color: rgba(135, 206, 235, 0.4);
    text-decoration: none;
}

.wsss-links-empty {
    color: #999;
    font-size: 12px;
    margin: 0;
}

/* ===== MEMBERSHIP PROMPTS ===== */

.wsss-links-prompt {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.wsss-prompt-text {
    color: #FFD700;
    font-size: 11px;
    flex: 1;
}

.wsss-signin-link,
.wsss-upgrade-link {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
    transition: all 0.3s ease;
}

.wsss-signin-link {
    background: rgba(135, 206, 235, 0.2);
    border: 1px solid #87ceeb;
    color: #87ceeb;
}

.wsss-signin-link:hover {
    background: rgba(135, 206, 235, 0.3);
    color: #b0e0e6;
}

.wsss-upgrade-link {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #FFD700;
    color: #FFD700;
}

.wsss-upgrade-link:hover {
    background: rgba(255, 215, 0, 0.3);
    color: #FFA500;
    border-color: #FFA500;
}

/* ===== POLYMARKET ===== */

.wsss-polymarket-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.wsss-polymarket-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #87ceeb;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wsss-polymarket-label {
    font-size: 12px;
    font-weight: 600;
    color: #87ceeb;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(135, 206, 235, 0.3);
    flex-shrink: 0;
}

.wsss-polymarket-list {
    flex: 1;
}

.wsss-polymarket-list a {
    display: block;
    text-align: center;
}

/* ===== SHORTCODE WRAPPER ===== */

.wsss-shortcode-wrapper {
    margin: 20px 0;
}

/* ===== RESPONSIVE: TABLET (1024px and below) ===== */

@media (max-width: 1024px) {
    .wsss-weather-container {
        gap: 15px;
    }

    .wsss-widget-container {
        padding: 15px;
    }

    .wsss-record-item {
        font-size: 11px;
        margin-bottom: 1px;
    }

    .wsss-col {
        font-size: 10px;
    }

    .wsss-records-list {
        max-height: 350px;
    }

    .wsss-station-grid {
        gap: 15px;
    }

    .wsss-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .wsss-links-list a {
        font-size: 10px;
        padding: 5px 6px;
    }

    .wsss-polymarket-container {
        gap: 12px;
    }
}

/* ===== RESPONSIVE: MOBILE (768px and below) ===== */

@media (max-width: 768px) {
    .wsss-weather-container,
    .wsss-station-grid,
    .wsss-links-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .wsss-widget-container,
    .wsss-external-links-widget {
        padding: 15px;
    }

    .wsss-widget-title h3 {
        font-size: 16px;
    }

    .wsss-records-list {
        max-height: 300px;
    }

    .wsss-records-tab-btn {
        padding: 5px 10px;
        font-size: 10px;
    }

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

    .wsss-links-column {
        padding: 12px;
        gap: 10px;
    }

    .wsss-links-list-horizontal a {
        white-space: normal;
    }

    .wsss-links-prompt {
        padding: 10px;
        gap: 6px;
    }

    .wsss-polymarket-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .wsss-polymarket-section {
        padding: 10px;
    }

    .wsss-polymarket-label {
        font-size: 11px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .wsss-polymarket-list a {
        font-size: 10px;
        padding: 5px 6px;
    }
}

/* ===== RESPONSIVE: SMALL MOBILE (480px and below) ===== */

@media (max-width: 480px) {
    .wsss-widget-container,
    .wsss-external-links-widget {
        padding: 10px;
        font-size: 11px;
    }

    .wsss-weather-container,
    .wsss-station-grid,
    .wsss-links-grid {
        gap: 12px;
    }

    .wsss-widget-title h3 {
        font-size: 14px;
    }

    .wsss-record-item {
        font-size: 9px;
        padding: 5px 6px;
    }

    .wsss-col {
        font-size: 9px;
        min-width: 30px;
    }

    .wsss-records-list {
        max-height: 250px;
    }

    .wsss-records-tab-btn {
        padding: 4px 8px;
        font-size: 9px;
    }

    .wsss-footer-info {
        font-size: 10px;
        padding-top: 10px;
    }

    .wsss-box-header h4 {
        font-size: 12px;
    }

    .wsss-links-title h3 {
        font-size: 11px;
    }

    .wsss-links-list a {
        font-size: 9px;
        padding: 4px 5px;
    }

    .wsss-links-prompt {
        flex-direction: column;
        text-align: center;
    }

    .wsss-signin-link,
    .wsss-upgrade-link {
        width: 100%;
    }

    .wsss-polymarket-container {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .wsss-polymarket-section {
        padding: 8px;
    }

    .wsss-polymarket-label {
        font-size: 10px;
        margin-bottom: 6px;
        padding-bottom: 5px;
    }

    .wsss-polymarket-list a {
        font-size: 9px;
        padding: 4px 5px;
    }
}
