/* ===========================
   NestHomie Theme Variables
   =========================== */

:root {
    /* Core surfaces / text */
    --bg-body: #0f172a;           /* deep navy/slate background */
    --bg-card: #1e293b;           /* panel cards */
    --bg-card-soft: #0f172a;      /* inner bubbles / note background */
    --border-card: #334155;       /* subtle border tone */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #cbd5e1;

    /* Brand + accent colors */
    --accent-main: #38bdf8;       /* NestHomie teal/cyan glow */
    --accent-main-contrast: #0f172a; /* text on teal */

    --accent-warn: #facc15;       /* warm yellow for reminders / warning */
    --accent-success: #22c55e;    /* success green */
    --accent-danger: #ef4444;     /* danger/red */

    /* Shadows / radii / sizing */
    --shadow-card: 0 20px 40px rgba(0,0,0,0.6);
    --shadow-nav:  0 -20px 40px rgba(0,0,0,0.8);

    --radius-card: 1rem;
    --radius-btn: .75rem;
    --radius-chip: .5rem;

    --tap-min-height: 9rem;
    --tap-min-height-md: 10rem;

    --body-font-size: 1.1rem;
    --header-font-size: 1.4rem;
    --title-font-size: 1.1rem;
    --reminder-title-font-size: 1.1rem;
    --day-num-font-size: 1rem;
    --cal-dow-font-size: .8rem;
    --nav-font-size: .9rem;
    --nav-icon-size: 1.3rem;

    /* Inputs / fields background */
    --input-bg: #475569;
    --input-border: #475569;
    --input-border-focus: var(--accent-main);
    --input-text: #fff;
    --input-radius: .75rem;
}

/* ===========================
   Global
   =========================== */

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-size: var(--body-font-size);
    padding-bottom: 5rem; /* space for fixed bottom nav */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.page-header-title {
    font-size: var(--header-font-size);
    font-weight: 600;
    color: var(--text-primary);
}

.page-header-subtitle,
.text-secondary,
.small.text-secondary {
    color: var(--text-secondary) !important;
    font-size: .8rem;
    line-height: 1.2;
}

/* Brand text styling for "NestHomie" label in headers / top bars */
.brand-logo-text {
    color: var(--accent-main);
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: 1.1rem;
}

/* Small subtext next to brand (like "Kitchen Panel") */
.brand-panel-subtext {
    color: var(--text-secondary);
    font-size: .8rem;
    line-height: 1.2;
}

/* ===========================
   Cards / Tiles
   =========================== */

.tap-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 2px solid var(--border-card);
    box-shadow: var(--shadow-card);
    padding: 1rem 1rem .75rem;
    min-height: var(--tap-min-height);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .tap-card {
        min-height: var(--tap-min-height-md);
    }
}

.tap-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.tap-card-title {
    font-size: var(--title-font-size);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.tap-card-body {
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.tap-card-footnote {
    padding-top: .5rem;
    padding-bottom: .25rem;
    text-align: right;
    font-size: .8rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Shopping list styles */

.shopping-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shopping-list-item {
    display: flex;
    align-items: center;
    margin-bottom: .5rem;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.shopping-list-icon {
    font-size: 1.25rem;
    margin-right: .5rem;
    line-height: 1;
    color: var(--accent-main);
}

.shopping-list-icon-done {
    color: var(--accent-success);
}

.shopping-list-done {
    color: var(--text-secondary);
    text-decoration: line-through;
    opacity: 0.7;
}

/* Note bubbles */

.note-bubble {
    background: var(--bg-card-soft);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 1rem;
    margin-bottom: 1rem;
}

.note-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: .5rem;
    font-size: .8rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.note-text {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
}

/* ===========================
   Icons / Accent helpers
   =========================== */

/* these map to accents used in the cards */
.icon-accent {
    color: var(--accent-main);
}

.icon-warn {
    color: var(--accent-warn);
}

.icon-success {
    color: var(--accent-success);
}

.icon-danger {
    color: var(--accent-danger);
}

/* ===========================
   Buttons / Actions
   =========================== */

.big-action-btn {
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    padding: .9rem 1rem;
    width: 100%;
    text-align: center;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .big-action-btn {
        font-size: 1.1rem;
    }
}

/* We’ll visually lean on the default Bootstrap button colors,
   but the outline/focus rings will be tweaked below via inputs */

.btn-outline-info,
.btn-outline-light,
.btn-outline-success,
.btn-outline-warning {
    border-radius: var(--radius-btn) !important;
}

/* ===========================
   Bottom Navigation Bar
   =========================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 2px solid var(--border-card);
    box-shadow: var(--shadow-nav);
    z-index: 9999;
}

.bottom-nav .nav-link {
    color: var(--text-muted);
    font-size: var(--nav-font-size);
    font-weight: 500;
    padding: .75rem .5rem;
    text-align: center;
}

.bottom-nav .nav-link .bi {
    font-size: var(--nav-icon-size);
    display: block;
    line-height: 1.2;
}

.bottom-nav .nav-link.active,
.bottom-nav .nav-link:active {
    color: var(--accent-main);
}

.bottom-nav-btn {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: var(--nav-font-size);
    font-weight: 500;
    padding: .75rem .5rem;
    text-align: center;
}

.bottom-nav-btn .bi {
    font-size: var(--nav-icon-size);
    display: block;
    line-height: 1.2;
}

.bottom-nav-btn.active {
    color: var(--accent-main);
}

/* ===========================
   Modals / Forms
   =========================== */

.modal-content.custom-modal {
    background: var(--bg-body);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    color: var(--text-primary);
}

.modal-header.custom-modal-header,
.modal-footer.custom-modal-footer {
    border-color: var(--border-card);
}

.modal-title.custom-modal-title {
    font-weight: 600;
    color: var(--text-primary);
}

.form-label.custom-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: .5rem;
}

/* Large touchable fields */
.form-control.touch-field,
textarea.touch-field,
select.touch-field {
    background: var(--input-bg);
    border: 0;
    color: var(--input-text);
    border-radius: var(--input-radius);
    font-size: 1rem;
    padding: .9rem 1rem;
}

.form-control.touch-field:focus,
textarea.touch-field:focus,
select.touch-field:focus {
    outline: 2px solid var(--input-border-focus);
    outline-offset: 0;
    box-shadow: none;
}

/* PIN input (modal) */
.pin-input-field {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: .1em;
    background: var(--input-bg);
    border: 0;
    color: var(--input-text);
    border-radius: var(--input-radius);
    padding: .75rem 1rem;
}

/* date/time widgets bigger for touch */
input[type="date"].touch-field,
input[type="time"].touch-field {
    min-height: 3.2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--input-text);
}

/* ===========================
   Reminders list
   =========================== */

.reminder-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 2px solid var(--border-card);
    box-shadow: var(--shadow-card);
    padding: 1rem 1rem .75rem;
}

.reminder-row-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.rem-title {
    font-size: var(--reminder-title-font-size);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 .25rem 0;
    line-height: 1.3;
}

.rem-meta {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.done-btn {
    border-radius: var(--radius-btn);
    font-weight: 600;
    padding: .6rem 1rem;
    line-height: 1.2;
    text-align: center;
}

/* ===========================
   Calendar
   =========================== */

.cal-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 2px solid var(--border-card);
    box-shadow: var(--shadow-card);
    padding: 1rem;
}

/* 7 columns for the week */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .5rem;
    text-align: center;
    font-size: 1rem;
}

.cal-dow {
    font-size: var(--cal-dow-font-size);
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* each date cell */
.cal-day {
    background: var(--bg-card-soft);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-btn);
    min-height: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    padding: .5rem;
    line-height: 1.2;
    color: var(--text-primary);
    font-weight: 600;
}

.cal-day-disabled {
    color: var(--text-secondary);
}

/* active / tappable state */
.cal-day-tappable {
    border: 2px solid var(--accent-main);
    box-shadow: 0 10px 20px rgba(56,189,248,.3);
    text-align: left;
}

/* number in date cell */
.day-num {
    font-size: var(--day-num-font-size);
    line-height: 1.2;
}

/* little badge for number of reminders that day */
.badge-rem {
    margin-top: auto;
    font-size: .7rem;
    font-weight: 600;
    background: var(--accent-main);
    color: var(--accent-main-contrast);
    border-radius: var(--radius-chip);
    padding: .15rem .4rem;
    line-height: 1.2;
}

/* ===========================
   Settings page
   =========================== */

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 2px solid var(--border-card);
    box-shadow: var(--shadow-card);
    padding: 1rem 1rem .75rem;
    margin-bottom: 1rem;
}

.settings-card-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .5rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* slightly recolor certain icons inline: */
.settings-card-header .icon-info {
    color: var(--accent-main);
}
.settings-card-header .icon-warn {
    color: var(--accent-warn);
}
.settings-card-header .icon-success {
    color: var(--accent-success);
}
.settings-card-header .icon-danger {
    color: var(--accent-danger);
}

.settings-card-hint {
    color: var(--text-secondary);
    font-size: .8rem;
    line-height: 1.3;
    display: block;
    margin-top: .25rem;
}

/* touch-friendly inputs for settings */
.settings-input,
.settings-select {
    background: var(--bg-body);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    border-radius: var(--input-radius);
    font-size: 1rem;
    padding: .9rem 1rem;
    width: 100%;
}

.settings-input:focus,
.settings-select:focus {
    outline: 2px solid var(--input-border-focus);
    box-shadow: none;
}

.settings-pin-field {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: .1em;
    background: var(--bg-body);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    border-radius: var(--input-radius);
    padding: .75rem 1rem;
    width: 100%;
}

/* "system" action buttons */
.system-btn {
    border-radius: var(--radius-btn);
    font-weight: 600;
    padding: .75rem 1rem;
    line-height: 1.2;
    text-align: center;
}
