.nh-weather-card {
    position: relative;
    background: linear-gradient(135deg, rgba(120, 120, 120, 0.88), rgba(90, 90, 90, 0.92));
    color: #f6f6f6;
    border-radius: 16px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.nh-weather-card__backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 35%),
                radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.10), transparent 40%),
                radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.06), transparent 45%);
    pointer-events: none;
    z-index: 0;
    animation: nhWeatherDrift 12s ease-in-out infinite alternate;
}

.nh-weather-card::after,
.nh-weather-card::before {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

.nh-weather-card--sun::after {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), rgba(255, 204, 102, 0.4));
    top: 10%;
    left: -10%;
    filter: blur(6px);
    animation: nhSunPath 14s ease-in-out infinite alternate;
    opacity: 0.9;
}

.nh-weather-card--moon::after {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.05));
    top: 15%;
    left: 60%;
    filter: blur(1px);
    animation: nhMoonFloat 18s ease-in-out infinite alternate;
    opacity: 0.7;
    box-shadow:
        -30px 10px 0 rgba(255, 255, 255, 0.08),
        40px -20px 0 rgba(255, 255, 255, 0.06);
}

.nh-weather-card--moon::before {
    width: 3px;
    height: 3px;
    background: #fff;
    box-shadow:
        20px 30px 0 0 rgba(255, 255, 255, 0.6),
        80px 50px 0 0 rgba(255, 255, 255, 0.4),
        120px 20px 0 0 rgba(255, 255, 255, 0.5),
        60px 10px 0 0 rgba(255, 255, 255, 0.45),
        30px 70px 0 0 rgba(255, 255, 255, 0.35),
        100px 80px 0 0 rgba(255, 255, 255, 0.25);
    top: 18%;
    left: 10%;
    opacity: 0.8;
    animation: nhStarsBlink 6s ease-in-out infinite alternate;
}

.nh-weather-card--day {
    background: linear-gradient(135deg, #cde6ff, #8cb8ff);
    color: #0b1c3a;
    border-color: rgba(255, 255, 255, 0.4);
}

.nh-weather-card--day .nh-weather-card__backdrop {
    background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.5), transparent 45%),
                radial-gradient(circle at 70% 15%, rgba(255, 255, 255, 0.35), transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.2), transparent 55%);
}

.nh-weather-card--night {
    background: linear-gradient(135deg, #1c1f2a, #2e3240);
    color: #f5f7fb;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.nh-weather-card--night .nh-weather-card__backdrop {
    background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.3), transparent 40%),
                radial-gradient(circle at 75% 15%, rgba(255, 255, 255, 0.25), transparent 45%),
                radial-gradient(circle at 55% 80%, rgba(255, 255, 255, 0.08), transparent 60%),
                radial-gradient(circle at 15% 70%, rgba(255, 255, 255, 0.12), transparent 50%);
}

@keyframes nhWeatherDrift {
    from { transform: translateX(-4px) translateY(-2px) scale(1); opacity: 0.9; }
    to { transform: translateX(6px) translateY(4px) scale(1.02); opacity: 1; }
}

@keyframes nhSunPath {
    from { transform: translate(0, 10px) scale(1); }
    to { transform: translate(40px, -20px) scale(1.05); }
}

@keyframes nhMoonFloat {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-30px, 15px) scale(0.96); }
}

@keyframes nhStarsBlink {
    from { opacity: 0.35; transform: scale(1); }
    to { opacity: 0.8; transform: scale(1.02); }
}

.nh-weather-card__hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.nh-weather-card__today {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nh-weather-card__city {
    font-size: 18px;
    font-weight: 700;
}

.nh-weather-card__summary {
    font-size: 14px;
    color: #e5e5e5;
}

.nh-weather-card__temp {
    font-size: 42px;
    font-weight: 800;
    text-align: center;
}

.nh-weather-card__meta {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.nh-weather-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-weight: 600;
    font-size: 13px;
}

.nh-weather-card__meta-item .dashicons {
    color: #fff;
}

.nh-weather-card__cta {
    cursor: pointer;
}

.nh-weather-card__arrow {
    font-size: 18px;
}

.nh-weather-card__forecast {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.nh-weather-day {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nh-weather-day__name {
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 12px;
}

.nh-weather-day__icon {
    font-size: 28px;
}

.nh-weather-day__summary {
    font-size: 13px;
    color: #f1f5f9;
}

.nh-weather-day__temp {
    font-size: 16px;
    font-weight: 700;
}

.nh-weather-card--dashboard {
    min-height: 200px;
}

.nh-weather-card--shortcode {
    margin: 12px 0;
}

.nh-weather-card--compact {
    padding: 12px 14px;
    min-height: unset;
}

.nh-weather-card--compact .nh-weather-card__hero {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
}

.nh-weather-card--compact .nh-weather-card__meta {
    justify-content: flex-end;
}

.nh-weather-card--compact .nh-weather-card__meta-item:not(.nh-weather-card__cta) {
    display: none;
}

.nh-weather-card--compact .nh-weather-card__forecast {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.25s ease;
    margin-top: 0;
}

.nh-weather-card--compact.nh-weather-card--expanded .nh-weather-card__forecast {
    max-height: 600px;
    opacity: 1;
    margin-top: 8px;
}

.nh-weather-card__meta-item.nh-weather-card__cta {
    background: rgba(255, 255, 255, 0.12);
}

.nh-weather-expand {
    background: transparent;
    border: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
}

@media (max-width: 900px) {
    .nh-weather-card__hero {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "today temp"
            "meta meta";
    }
    .nh-weather-card__today { grid-area: today; }
    .nh-weather-card__temp { grid-area: temp; }
    .nh-weather-card__meta { grid-area: meta; justify-content: flex-start; }
}

/* ============================================================
   CITY EDIT BUTTON & WRAPPER
   ============================================================ */

.nh-weather-card__city-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nh-weather-edit-city {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nh-weather-edit-city:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

.nh-weather-edit-city .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: inherit;
}

.nh-weather-card--day .nh-weather-edit-city {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

.nh-weather-card--day .nh-weather-edit-city:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* ============================================================
   CITY MODAL
   ============================================================ */

.nh-weather-city-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    border-radius: 16px;
}

.nh-weather-city-modal--open {
    opacity: 1;
    visibility: visible;
}

.nh-weather-city-modal__content {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    min-width: 280px;
    max-width: 90%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    color: #1a1a2e;
    overflow: hidden;
}

.nh-weather-city-modal__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.nh-weather-city-modal__header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.nh-weather-city-modal__body {
    padding: 16px;
    position: relative;
}

.nh-weather-city-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.nh-weather-city-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.nh-weather-city-suggestions {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 100%;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    margin-top: -8px;
}

.nh-weather-city-suggestions:empty {
    display: none;
}

.nh-weather-city-suggestion {
    display: block;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background 0.15s;
}

.nh-weather-city-suggestion:hover {
    background: #f5f5f5;
}

.nh-weather-city-suggestion:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.nh-weather-city-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.nh-weather-city-cancel,
.nh-weather-city-save {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.nh-weather-city-cancel {
    background: #e0e0e0;
    border: none;
    color: #444;
}

.nh-weather-city-cancel:hover {
    background: #d0d0d0;
}

.nh-weather-city-save {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: #fff;
}

.nh-weather-city-save:hover {
    filter: brightness(1.05);
}

.nh-weather-city-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nh-weather-city-save:active,
.nh-weather-city-cancel:active {
    transform: scale(0.97);
}
