/* ============================================================
   TOP_HEADER.CSS - Complete Styles for Top Header
   ============================================================ */

/* ----- Top Header Container ----- */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a2e;
    padding: 8px 20px;
    color: #fff;
    font-size: 14px;
    flex-wrap: wrap;
    position: relative;
}

/* ----- Top Header Links ----- */
.top-header a {
    color: #fff;
    text-decoration: none;
    margin-right: 18px;
    transition: 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.top-header a:last-child {
    margin-right: 0;
}

.top-header a:hover {
    color: #f5c518;
}

/* ----- Left & Right Sections ----- */
.top-header-left,
.top-header-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* ----- Center Section with Weather & Time ----- */
.top-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

#weather-time-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.07);
    padding: 4px 18px 4px 14px;
    border-radius: 30px;
    margin: 0 auto;
    font-weight: 400;
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

#weather-time-container i {
    font-size: 0.95rem;
}

.divider {
    color: rgba(255, 255, 255, 0.25);
    margin: 0 4px;
}

#weather-display,
#live-time-display {
    font-weight: 400;
}

/* ----- Weather Icon Animation ----- */
#weather-icon {
    transition: transform 0.3s ease;
}

#weather-time-container:hover #weather-icon {
    transform: rotate(20deg);
}

/* ----- Weather Details Popup ----- */
.weather-details-popup {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 10px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(26, 26, 46, 0.95);
    animation: slideDown 0.3s ease;
}

.weather-details-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.1);
}

.weather-details-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weather-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 13px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.weather-detail-item:last-child {
    border-bottom: none;
}

.weather-detail-item i {
    width: 20px;
    color: #f5c518;
    font-size: 14px;
}

.weather-detail-item span {
    color: #e0e0e0;
}

#detail-updated {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* ----- Animations ----- */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================================
   RESPONSIVE STYLES
   ============================================================ */

/* Tablet & Mobile */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .top-header-left,
    .top-header-right {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }

    .top-header-center {
        order: 0;
        width: 100%;
    }

    #weather-time-container {
        margin: 0 auto;
    }

    .top-header-left {
        order: 1;
    }

    .top-header-right {
        order: 2;
    }

    .weather-details-popup {
        left: 50%;
        transform: translateX(-50%);
        min-width: 200px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .top-header {
        padding: 6px 12px;
        font-size: 12px;
    }

    .top-header a {
        margin-right: 10px;
        font-size: 12px;
    }

    #weather-time-container {
        padding: 3px 12px 3px 10px;
        font-size: 12px;
        gap: 4px;
    }

    #weather-time-container i {
        font-size: 0.8rem;
    }

    .weather-details-popup {
        min-width: 180px;
        padding: 12px 15px;
        margin-top: 8px;
    }

    .weather-detail-item {
        font-size: 12px;
        padding: 2px 0;
    }

    .weather-detail-item i {
        font-size: 12px;
        width: 18px;
    }
}

/* Very Small Mobile */
@media (max-width: 360px) {
    .top-header a {
        margin-right: 6px;
        font-size: 10px;
        gap: 3px;
    }

    #weather-time-container {
        font-size: 10px;
        padding: 2px 8px 2px 6px;
        gap: 3px;
    }

    #weather-time-container i {
        font-size: 0.7rem;
    }

    .divider {
        margin: 0 2px;
    }

    .weather-details-popup {
        min-width: 160px;
        padding: 10px 12px;
    }

    .weather-detail-item {
        font-size: 10px;
        gap: 6px;
    }

    .weather-detail-item i {
        font-size: 10px;
        width: 16px;
    }
}