﻿h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.fab-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding-right: env(safe-area-inset-right, 8px); /* iOS edge-safe */
}

.fab-container.horizontal {
    flex-direction: row;
}

.fab-container.vertical {
    flex-direction: column;
}

.fab-main {
    background: rgba(34, 34, 34, 0.85);
    color: white;
    border: 1px solid rgba(240, 240, 240, 0.85);
    border-radius: 8px;
    width: 52px;
    height: 52px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(3px);
    z-index: 1001;
}

    .fab-main:hover {
        background: rgba(55, 55, 55, 0.85);
        transform: scale(1.05);
    }

    .fab-main.small {
        font-size: 12px;
        width: 32px;
        height: 32px;
        border-radius: 16px;
    }

.fab-stack-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.fab-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    animation: fadeInUp 0.2s ease;
    gap: 8px;
    z-index: 1001;
}

.fab-pair {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
    padding-right: 4px;
}

.fab-icon-only {
    background: rgba(34, 34, 34, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    backdrop-filter: blur(3px);
    transition: background 0.2s ease;
}

    .fab-icon-only:hover {
        background: rgba(55, 55, 55, 0.85);
    }

.fab-pill {
    background: rgba(34, 34, 34, 0.85);
    color: white;
    border: 1px solid rgba(240, 240, 240, 0.85);
    border-radius: 32px;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    min-width: 190px;
    justify-content: space-between;
    backdrop-filter: blur(3px);
    transition: background 0.2s ease;
}

    .fab-pill:hover {
        background: rgba(55, 55, 55, 0.85);
    }

.fab-label {
    flex-grow: 1;
    text-align: left;
}

.fab-icon {
    background: #444;
    border-radius: 50%;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

    .fab-icon i {
        font-size: 1.1rem;
    }

@@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    padding-bottom: 128px; /* ensures content never behind FAB */
}

.mini-chart-container {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100px;
    width: 30vw;
    background: #333;
    border-radius: 6px;
    padding: 0.25rem;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

    .mini-chart-container:hover {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }

.mini-chart-title {
    position: absolute;
    top: 0.3rem;
    left: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #eee;
    text-shadow: 0 0 2px #000;
    pointer-events: none;
    z-index: 5;
}

.chart-modal-dialog {
    width: 90vw;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1rem;
    min-height: 300px;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 350px; /* Adjust as needed */
    /*background: repeating-linear-gradient( 45deg, #fdd, #fdd 10px, #fee 10px, #fee 20px );*/
}

    .mini-chart-container div,
    .mini-chart-container canvas,
    .chart-wrapper div,
    .chart-wrapper canvas {
        height: 100% !important;
        width: 100% !important;
        display: block;
    }

.grow-section-card {
    background: #aacfaa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

    .grow-section-card .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        line-height: 2;
        color: #333;

        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

        .grow-section-card .header .header-actions {
            margin-right: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .grow-section-card .header .title {
            font-size: 1.5rem;
            color: #333;
            width: 100%;
            line-height: 1.5rem;
        }

    .grow-section-card .chevron {
        transition: transform 0.3s ease;
    }

        .grow-section-card .chevron.rotate {
            transform: rotate(180deg);
        }

    .grow-section-card .body {
        margin-top: 5px;
    }

.event-filters {
    margin-bottom: 10px;
}

.event-filters label {
    line-height: 2;
    font-size: 1.25rem;
}

.event-filters input {
    height: 16px;
    width: 16px;
}

.modal-container {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    pointer-events: none;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    /*width: calc(100vw - 16px);*/
}

.modal-background {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.modal-dialog {
    position: relative !important;
    background: #fefefe;
    max-width: 500px;
    width: 100% !important;
    max-height: 90vh;
    /*display: flex;*/
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ddd;
    pointer-events: auto !important;
    border-radius: 8px;
    padding: 2rem;
    z-index: 10001;
    pointer-events: auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

    .modal-dialog label {
        color: #333;
        font-weight: bold;
    }

    .modal-dialog h5 {
        color: #333;
    }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #ccc;
}

    .modal-header h4 {
        font-size: 1.2rem;
        font-weight: 600;
        color: #333;
        margin: 0;
    }

.btn-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #777;
    transition: color 0.2s;
}

    .btn-close:hover {
        color: #000;
    }

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

    .modal-body label {
        font-weight: 600;
        font-size: 0.9rem;
        color: #444;
    }

.filter-section {
    margin-bottom: 1rem;
}

.filter-header {
    font-weight: 600;
    color: #2a4f3c;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.filter-body {
    padding-left: 1.25rem;
}

.badge {
    background-color: #d1e7dd;
    color: #0f5132;
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
}

.grow-log-image-container {
    position: relative;
    display: inline-block;
    width: fit-content;
    margin: 8px auto;
}

.grow-log-image-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 4px;
    margin-left: 8px;
    cursor: pointer;
    z-index: 10;
    padding: 8px;
}

.zoom-icon {
    right: 8px;
}

.edit-icon {
    right: 44px;
}

.grow-log-image-tags {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    padding: 4px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    z-index: 10;
}

.grow-log-image-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px; /* slightly larger padding */
    border-radius: 9999px;
    font-size: 0.85rem; /* ↑ bumped up from 0.75rem */
    font-weight: 600;
    color: #f3f3f3;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    border: 1px solid transparent;
    transition: background-color 0.2s ease;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

/* Muted, earthy tones */
.tag-event {
    background-color: #5a3e3e; /* muted maroon */
    border-color: #3d2929;
}

.tag-source {
    background-color: #3d4f5a; /* steel blue-gray */
    border-color: #293842;
}

.tag-stage {
    background-color: #3d5a3d; /* muted forest green */
    border-color: #2b3f2b;
}

.tag-year {
    background-color: #5a513d; /* ochre-tan muted */
    border-color: #3f3a2b;
}

/* Optional: Simulate a darker border from same base color */
.tag-event {
    border: 1px solid rgba(145, 30, 45, 0.85);
}

.tag-source {
    border: 1px solid rgba(0, 80, 180, 0.85);
}

.tag-stage {
    border: 1px solid rgba(20, 110, 45, 0.85);
}

.tag-year {
    border: 1px solid rgba(180, 120, 0, 0.85);
}

.tag-name {
    font-weight: bold;
    margin-right: 4px;
}

.tag-value {
    font-style: italic;
    opacity: 0.8;
}

.grow-log-image-tools {
    position: absolute;
    top: 40px;
    right: 8px;
    background-color: rgba(0,0,0,0.6);
    border-radius: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

    .grow-log-image-tools button {
        background: none;
        border: none;
        color: white;
        margin: 2px 0;
        cursor: pointer;
        font-size: 16px;
        padding: 8px;
    }

.grow-log-image-lightbox {
    position: fixed !important;
    inset: 0;
    z-index: 9999 !important;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 36px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

.lightbox-tools {
    position: fixed;
    top: 60px;
    right: 20px;
    background-color: rgba(0,0,0,0.6);
    border-radius: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

    .lightbox-tools button {
        background: none;
        border: none;
        color: white;
        margin: 2px 0;
        cursor: pointer;
        font-size: 20px;
        padding: 8px;
    }

.image-sort-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    padding: 0 8px;
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8px;
}

.gallery-pagination {
    margin-top: 20px;
    text-align: center;
}

.gallery-grid .grow-log-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: rgba(240,240,240,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

    .gallery-grid .grow-log-image-container img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
    }