/* ==========================================================================
   OrbitOS app refresh (H209B): Weather and Notes.
   Colours come from the theme except where the content itself has colour
   (the sky for the current weather, a hue per note).
   ========================================================================== */

/* ---------------------------------- Weather ---------------------------------- */

#weather-fullscreen .modern-card {
    margin-bottom: 0 !important;
}

#weather-fullscreen .wx-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 22px 22px 20px !important;
    border: none !important;
    border-radius: 24px !important;
    color: #ffffff;
    text-align: left;
    overflow: hidden;
}

#weather-fullscreen .wx-hero * {
    color: #ffffff !important;
}

#weather-fullscreen .wx-sky-clear { background: linear-gradient(160deg, #2f6fe0 0%, #4f93f2 55%, #87bff7 100%) !important; }
#weather-fullscreen .wx-sky-cloudy { background: linear-gradient(160deg, #3f5270 0%, #5d7394 60%, #8397b3 100%) !important; }
#weather-fullscreen .wx-sky-fog { background: linear-gradient(160deg, #4a5663 0%, #6b7886 60%, #909ba7 100%) !important; }
#weather-fullscreen .wx-sky-rain { background: linear-gradient(160deg, #1c3354 0%, #2f5079 60%, #4b6f99 100%) !important; }
#weather-fullscreen .wx-sky-snow { background: linear-gradient(160deg, #56718f 0%, #7f9ab5 60%, #b3c6d9 100%) !important; }
#weather-fullscreen .wx-sky-storm { background: linear-gradient(160deg, #241a42 0%, #3e2f6b 60%, #5b4a8f 100%) !important; }
#weather-fullscreen .wx-sky-night { background: linear-gradient(160deg, #0c1633 0%, #1a2d66 60%, #2e4a93 100%) !important; }
#weather-fullscreen .wx-sky-night-cloudy { background: linear-gradient(160deg, #161d2b 0%, #2a3447 60%, #3e4a60 100%) !important; }

#weather-fullscreen .wx-hero-place {
    font-size: 1.05rem;
    font-weight: 700;
    opacity: 0.92;
}

#weather-fullscreen .wx-hero-temp {
    margin: 6px 0 2px;
    font-size: 4.6rem;
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 1;
}

#weather-fullscreen .wx-hero-cond {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 600;
}

#weather-fullscreen .wx-hero-cond svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff !important;
}

#weather-fullscreen .wx-hero-sub {
    margin-top: 6px;
    font-size: 0.88rem;
    opacity: 0.85;
}

@media (max-width: 600px) {
    #weather-fullscreen .wx-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

#weather-fullscreen .wx-stats .modern-card {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 14px !important;
    border: none !important;
    border-radius: 18px !important;
    background: color-mix(in srgb, var(--surface-color, #0d1117) 92%, var(--on-surface, #ffffff) 8%) !important;
}

#weather-fullscreen .wx-stats .modern-card > div > div:first-child {
    font-family: var(--font-main) !important;
    letter-spacing: 0.04em;
}

#weather-fullscreen .fullscreen-app-body .modern-card:not(.wx-hero) {
    border-radius: 20px !important;
}

#weather-fullscreen [style*="font-family: var(--font-mono)"] {
    font-family: var(--font-main) !important;
}

/* ----------------------------------- Notes ----------------------------------- */

#notes-fullscreen .notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding-bottom: 40px;
}

#notes-fullscreen .notesui-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    margin: 0 !important;
    padding: 16px 16px 14px !important;
    border: none !important;
    border-radius: 20px !important;
    background: color-mix(in srgb, var(--note-hue, #4790e6) 16%, var(--surface-color, #0d1117)) !important;
    overflow: hidden;
    cursor: pointer;
}

#notes-fullscreen .notesui-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    width: 32px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: var(--note-hue, #4790e6);
}

#notes-fullscreen .note-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--on-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#notes-fullscreen .note-preview {
    flex: 1;
    margin-top: 6px;
    font-size: 0.86rem;
    line-height: 1.45;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 72%, transparent);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-line;
}

#notes-fullscreen .note-date {
    margin-top: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 50%, transparent);
}

/* Editor header: compact icon buttons so Close stays on screen on phones. */
#notes-fullscreen .notes-editor-header {
    gap: 8px !important;
}

#notes-fullscreen .notes-icon-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}

#notes-fullscreen .notes-editor-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 50%, transparent);
}
@media (max-width: 380px) {
    #notes-fullscreen .fullscreen-app-header { gap: 6px; padding: 10px !important; }
    #notes-fullscreen .fullscreen-app-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
    }
    #notes-fullscreen .fullscreen-app-header > div:has(#notesui-new-btn) { flex-shrink: 0; gap: 4px !important; }
    #notes-fullscreen #notesui-new-btn {
        width: 36px;
        height: 36px;
        padding: 0 !important;
        justify-content: center;
        font-size: 1.25rem !important;
    }
    #notes-fullscreen .notes-new-label { display: none; }
}
