/* =====================
   APP CONTAINER
   ===================== */
#app
{
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: background 0.3s ease, color 0.3s ease, border-radius 0.3s ease, box-shadow 0.3s ease, margin 0.3s ease;
}



/* =====================
   OFFLINE BANNER
   ===================== */
.offline-banner {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--color-offline-bg);
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-offline);
}

.offline-banner-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.offline-banner-text {
    font-size: 0.72rem;
    font-family: var(--font-body);
    font-style: italic;
    color: var(--muted);
}

/* Each view fills available space and scrolls */
.view-container
{
    flex: 1 1 0%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* When Alpine hides it, revert to display:none (Alpine will override when visible) */
.view-container[style*="display: none"]
{
    flex: 1 1 0%;
    overflow-y: auto;
}

/* Home view uses nested flex layout (header + scroll + footer) */
.view-container:has(.home-header)
{
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* =====================
   FLOATING LEAVES
   ===================== */
/* grain texture removed — feTurbulence SVG filter is expensive on mobile GPU */
.leaf
{
    position: fixed;
    pointer-events: none;
    z-index: 0;
    animation: leafFloat linear infinite;
    opacity: 0;
}

/* Watering reminder banner */
.watering-banner {
    width: 100%;
    background: rgba(61,122,74,0.08);
    border: 1px solid rgba(61,122,74,0.18);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.watering-banner:hover {
    background: rgba(61,122,74,0.14);
    border-color: rgba(61,122,74,0.3);
}

.watering-banner-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.watering-banner-text {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text);
    font-style: italic;
}

.watering-banner-dismiss {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 4px;
    opacity: 0.5;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.watering-banner-dismiss:hover {
    opacity: 1;
}

.watering-banner-action {
    font-size: 0.7rem;
    font-style: italic;
    color: var(--muted);
    opacity: 0.7;
    flex-shrink: 0;
}

/* =====================
   HOME — FLOATING TOOL BUTTONS
   ===================== */
.home-tool-btn--journal
{
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
}

.home-tool-btn--settings
{
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.home-tool-btn--settings .home-tool-btn
{
    border-radius: 0 0 0 10px;
    border-right: none;
    border-top: none;
}

.home-tool-btn
{
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    color: var(--muted);
    line-height: 1;
    padding: 0;
}

.home-tool-btn:hover
{
    background: var(--color-bg-inset);
}

.home-tool-btn:active
{
    opacity: 0.7;
}

/* =====================
   HOME — HEADER
   ===================== */
.home-header
{
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 1rem 6px;
    width: 100%;
}

.home-header h1
{
    font-size: 1.5rem;
    margin: 0;
    text-align: center;
}

.home-header h1 em
{
    font-style: italic;
    font-weight: 400;
}

.home-subtitle
{
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: var(--font-body);
}

/* =====================
   HOME — FOOTER TABS
   ===================== */
.home-footer
{
    flex-shrink: 0;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--color-muted);
    background: var(--color-bg-inset);
    width: 100%;
}

.home-footer-tab
{
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 12px 4px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
    text-align: center;
}

.home-footer-tab.active
{
    border-bottom: 2px solid var(--text);
}

.home-footer-tab:hover
{
    color: var(--text);
}

.home-footer-divider
{
    color: var(--border);
    font-size: 0.65rem;
    font-weight: 300;
    user-select: none;
    line-height: 1;
}

/* =====================
   HOME SCROLL
   ===================== */
.home-scroll
{
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 1rem 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--fern) transparent;
}

.home-scroll::-webkit-scrollbar
{
    width: 3px;
}

.home-scroll::-webkit-scrollbar-track
{
    background: transparent;
}

.home-scroll::-webkit-scrollbar-thumb
{
    background: var(--fern);
    border-radius: 99px;
    opacity: 0.4;
}