/* WeatherBot by RoxxiStudios Public Styles (optimized v3.2.2 with compat patch) */
/* =========================
   1) Theme Variables
   ========================= */
:root {
    --wb-primary: #114572;
    --wb-secondary: #DFAF3D;
    --wb-neutral: #7A7A7A;
    --wb-light: #A1A1A1;
    --wb-dark: #1A1A1A;
}

/* =========================
   2) Core Wrapper
   ========================= */
.roxxi-weather {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    width: fit-content;
    margin: 0;
    font-family: Poppins;
    font-weight: 600;
    line-height: 1.2;
    font-size: 16px;
    background: white;
}

 .roxxi-weather .details {
     display: flex;
     flex-wrap: wrap;
     align-items: center;
     gap: 5px;
}

body .roxxi-weather.wb-left {
    align-items: flex-start;
    margin-left: 0;
}

body .roxxi-weather.wb-center {
    display: flex;
    align-items: center;
    margin: 0 auto;
}

body .roxxi-weather.wb-right {
    display: flex;
    align-items: flex-end;
    margin-left: auto;
}

.roxxi-weather .conditions {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
}

.widget.widget_roxxi_weather_widget .wb-powered,
.roxxi-weather .wb-powered {
    font-size: 11px;
    line-height: 1.2;
}

/* temperature and conditions */
.roxxi-weather .wb-ico {
    width: 20px;
    height: auto;
}

.roxxi-weather .temp {
    display: flex;
    align-items: center;
    gap: 2px;
}

.roxxi-weather .degree {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.roxxi-weather .wb-unit {
    opacity: 0.9;
}

.roxxi-weather .wb-desc {
    color: var(--wb-neutral);
    font-size: 18px;
    font-weight: normal;
}

/* powered-by line */
.roxxi-weather .wb-powered {
    font-weight: normal;
    color: var(--wb-light) !important;
}

.roxxi-weather .wb-powered-link,
.widget.widget_roxxi_weather_widget .wb-powered-link {
    color: var(--wb-primary) !important;
    text-decoration: none;
}

.roxxi-weather .wb-powered-link:hover,
.roxxi-weather .wb-powered-link:focus,
.widget.widget_roxxi_weather_widget .wb-powered-link:hover,
.widget.widget_roxxi_weather_widget .wb-powered-link:focus {
    color: var(--wb-secondary) !important;
    text-decoration: none;
}

/*** BADGE ***/
.roxxi-weather.wb-type-badge {
    display: inline-flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid var(--wb-neutral);
    border-radius: 5px;
    font-size: 18px;
}

.roxxi-weather.wb-type-badge .badge {
    display: flex;
    gap: 8px;
}

 .roxxi-weather.wb-type-badge .details {
     flex-direction: column;
     align-items: flex-start;
 }

.roxxi-weather.wb-type-badge .conditions {
    align-items: center;
}

.roxxi-weather.wb-type-badge .wb-ico {
    width: 28px;
    height: auto;
}

.roxxi-weather.wb-type-badge .conditions .temp {
    font-weight: 600;
    gap: 4px;
}

.roxxi-weather.wb-type-badge .temp .degree {
    font-size: 20px;
}

/*** COMPACT ***/
.roxxi-weather.wb-type-compact {
    flex-direction: column;
    padding: 8px 10px;
    border: 1px solid var(--wb-neutral);
    border-radius: 5px;
}

.roxxi-weather.wb-type-compact {
    gap: 6px;
}

/*** INLINE ***/
.roxxi-weather.wb-type-inline {
    display: inline-flex;
    border: 0;
    background: none;
    gap: 8px;
}

/* =========================
   Font Color Helpers
   ========================= */
.roxxi-weather.wb-font-light {
    color: #ffffff;
}

.roxxi-weather.wb-font-light .wb-powered-link {
    color: inherit;
}

.roxxi-weather.wb-font-dark {
    color: var(--wb-dark);
}

.roxxi-weather.wb-font-dark .wb-powered-link {
    color: inherit;
}

/* =========================
   Responsive Adjustments
   ========================= */
@media (max-width: 480px) {
    .roxxi-weather:not(.wb-type-inline) {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .roxxi-weather:not(.wb-type-inline) .conditions {
        justify-content: space-evenly;
        align-self: flex-start;
        flex-wrap: wrap;
        column-gap: 8px;
    }

    .roxxi-weather.wb-type-badge .conditions .wb-ico {
        width: 20px;
        margin: 0;
    }

    .roxxi-weather .wb-sep {
        display: none;
    }

    .roxxi-weather.wb-type-badge .badge {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    /*** WIDGET ***/
    .widget.widget_roxxi_weather_widget .roxxi-weather .wb-pre {
        text-align: left;
    }
}

@media (max-width: 320px) {
    
    .roxxi-weather, .roxxi-weather .wb-badge {
        flex-direction: column;
        justify-content: center;
        align-content: center;
    }

    .roxxi-weather.wb-type-badge .wb-pre,
    .roxxi-weather.wb-type-badge .wb-temp,
    .roxxi-weather.wb-type-badge .wb-unit,
    .roxxi-weather.wb-type-badge .conditions {
        font-size: 15px;
    }

    .roxxi-weather.wb-type-compact .wb-pre,
    .roxxi-weather.wb-type-compact .wb-temp,
    .roxxi-weather.wb-type-compact .wb-unit {
        font-size: 12px;
    }

    .roxxi-weather.wb-type-inline,
    .roxxi-weather.wb-type-inline .wb-pre {
        flex-direction: row;
        gap: 5px;
    }

    .roxxi-weather.wb-type-inline .wb-pre,
    .roxxi-weather.wb-type-inline .wb-temp,
    .roxxi-weather.wb-type-inline .wb-unit {
        font-size: 14px;
        font-weight: 500;
    }

    .roxxi-weather.wb-type-inline .wb-ico {
        display: none;
    }
    
}

/* While loading, show only the line; hide icon/temp/unit/desc */

.roxxi-weather .conditions.wb-loading .wb-ico,
.roxxi-weather .conditions.wb-loading .wb-temp,
.roxxi-weather .conditions.wb-loading .wb-sep,
.roxxi-weather .conditions.wb-loading .wb-unit,
.roxxi-weather .conditions.wb-loading .wb-desc {
    display: none;
}

/* Show the loading message only during loading */
.roxxi-weather .conditions .wb-loading-msg {
    display: none;
}

.roxxi-weather .conditions.wb-loading .wb-loading-msg {
    display: inline;
}

/* Optional niceties */

.roxxi-weather .conditions .wb-loading-msg {
    font-size: 15px;
    margin-left: 0;
    font-style: italic;
    font-weight: normal;
    text-align: center;
    opacity: .85;
}

.roxxi-weather .conditions.wb-loading .wb-loading-msg::after {
    content: "";
    display: inline-block;
    animation: wb-ellipsis 1.2s infinite steps(4);
    width: 1em;
    /* keeps spacing consistent */
    text-align: left;
}

@keyframes wb-ellipsis {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75% {
        content: "...";
    }

    100% {
        content: "";
    }
}

/* =========================
   Compat Patch
   ========================= */
/* Badge wrapper class used by renderer */
.roxxi-weather.wb-type-badge .wb-badge {
    display: flex;
    flex-direction: column;
    align-items: inherit;
    flex-wrap: wrap;
    gap: 5px;
}

/* Support both wb-text-* and wb-font-* */
.roxxi-weather.wb-text-light,
.roxxi-weather.wb-font-light {
    color: #ffffff;
}

.roxxi-weather.wb-text-dark,
.roxxi-weather.wb-font-dark {
    color: var(--wb-dark);
}

.roxxi-weather.wb-text-light .wb-powered-link,
.roxxi-weather.wb-font-light .wb-powered-link,
.roxxi-weather.wb-text-dark .wb-powered-link,
.roxxi-weather.wb-font-dark .wb-powered-link {
    color: inherit !important;
}