:root {
    --bv-primary: #7B1E3A;
    --bv-secondary: #C4A574;
    --bv-ink: #1f1418;
    --bv-paper: #f7f1ea;
    --bv-paper-deep: #ebe0d4;
}

html, body {
    font-family: "Segoe UI", "Candara", "Gill Sans", sans-serif;
    color: var(--bv-ink);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(123, 30, 58, 0.12), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(196, 165, 116, 0.18), transparent 55%),
        linear-gradient(180deg, var(--bv-paper), var(--bv-paper-deep));
    min-height: 100%;
}

.bv-auth-shell {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100vh;
    padding: calc(100vh / 10) 1.5rem 1.5rem;
    box-sizing: border-box;
}

a {
    color: var(--bv-primary);
}

.bv-header {
    background: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid rgba(123, 30, 58, 0.15);
    padding: 0;
}

.bv-header .navbar {
    color: var(--bv-primary);
}

.bv-content {
    min-height: calc(100vh - 3.5rem);
    padding-top: 3.5rem;
}

.bv-stat {
    background: rgba(255, 255, 255, 0.65);
    border-left: 4px solid var(--bv-primary);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.bv-stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--bv-primary);
    margin: 0;
}

.bv-stat-table {
    width: 100%;
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
}

.bv-stat-table td {
    padding: 0.2rem 0;
    vertical-align: top;
}

.bv-stat-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--bv-primary);
}

.bv-year-chart-wrap {
    overflow-x: auto;
    margin-top: 0.5rem;
}

.bv-year-chart {
    display: block;
    width: 100%;
    height: auto;
}

.bv-year-chart-axis {
    stroke: rgba(31, 20, 24, 0.2);
    stroke-width: 1;
}

.bv-year-chart-bar {
    fill: var(--bv-primary);
}

.bv-year-chart-label,
.bv-year-chart-value {
    fill: var(--bv-ink);
    font-size: 11px;
}

.bv-year-chart-value {
    fill: var(--bv-primary);
    font-weight: 600;
    font-size: 10px;
}

.bv-color-chart-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 0.5rem;
}

.bv-color-chart {
    display: block;
    width: min(220px, 100%);
    height: auto;
    flex: 0 0 auto;
}

.bv-color-chart-slice {
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1;
}

.bv-color-chart-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 140px;
    font-size: 0.95rem;
}

.bv-color-chart-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0;
}

.bv-color-chart-swatch {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid rgba(31, 20, 24, 0.15);
}

.bv-color-chart-legend-label {
    flex: 1 1 auto;
}

.bv-color-chart-legend-value {
    font-weight: 600;
    color: var(--bv-primary);
}

#app-loading-container {
    display: block;
}

.bv-loading-splash {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(123, 30, 58, 0.12), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(196, 165, 116, 0.18), transparent 55%),
        linear-gradient(180deg, var(--bv-paper), var(--bv-paper-deep));
}

.bv-loading-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 400px;
    width: 100%;
    padding: 0 1.5rem;
}

.bv-loading-logo {
    background-image: url('wine-beer-glass-icon.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 120px;
    height: 120px;
    flex-basis: 100%;
}

.bv-loading-break {
    flex-basis: 100%;
    height: 0;
}

.bv-loading-bar-container {
    flex-basis: 100%;
    width: 100%;
    height: 8px;
    background-color: rgba(31, 20, 24, 0.12);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bv-loading-bar-indeterminate {
    width: 40%;
    height: 100%;
    background-color: var(--bv-primary);
    border-radius: 4px;
    position: absolute;
    left: -40%;
    animation: bv-loading-bar 1.5s ease-in-out infinite;
}

@keyframes bv-loading-bar {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

.bv-help {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0.5rem 0 2rem;
    line-height: 1.6;
}

.bv-help h1 {
    color: var(--bv-primary);
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.bv-settings-column-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bv-settings-column-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(123, 30, 58, 0.18);
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.bv-settings-column-item.is-selected {
    border-color: var(--bv-primary);
    background: rgba(123, 30, 58, 0.08);
}

.bv-settings-column-actions {
    display: flex;
    gap: 0.25rem;
}

.bv-settings-tabs {
    margin-top: 0.5rem;
}

.bv-help h2 {
    color: var(--bv-primary);
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(123, 30, 58, 0.12);
}

.bv-help h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.bv-help h3 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
}

.bv-help h4 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
}

.bv-help p,
.bv-help ul {
    margin-bottom: 0.75rem;
}

.bv-help ul {
    padding-left: 1.5rem;
}

.bv-help li {
    margin-bottom: 0.35rem;
}

.bv-help-toc {
    background: rgba(255, 255, 255, 0.65);
    border-left: 4px solid var(--bv-secondary);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 0 4px 4px 0;
}

.bv-help-toc ol {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.bv-help-toc li {
    margin-bottom: 0.25rem;
}

.bv-help-toc a {
    text-decoration: none;
}

.bv-help-toc a:hover {
    text-decoration: underline;
}

.bv-help-maturity-legend {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.bv-help-maturity-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bv-maturity-young { transform: rotate(90deg); }
.bv-maturity-good { transform: rotate(45deg); }
.bv-maturity-peak { transform: rotate(0deg); }
.bv-maturity-old { transform: rotate(135deg); }

.bv-help-back {
    margin-top: 2rem;
    text-align: right;
    font-size: 0.9rem;
}

.bv-blog-toolbar {
    max-width: 52rem;
    margin: 0 auto 1rem;
}

.bv-blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1rem;
}

.bv-blog-tag {
    cursor: pointer;
}

.bv-blog-card {
    max-width: 52rem;
    margin: 0 auto 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.7);
    border-left: 4px solid var(--bv-secondary);
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.bv-blog-card:hover {
    background: rgba(255, 255, 255, 0.9);
}

.bv-blog-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bv-blog-card-title {
    margin: 0;
    color: var(--bv-primary);
}

.bv-blog-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.bv-blog-linked {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0;
}

.bv-blog-pager {
    max-width: 52rem;
    margin: 1.5rem auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.bv-blog-body {
    margin: 1.25rem 0;
}

.bv-blog-body table {
    width: 100%;
    margin-bottom: 1rem;
}

.bv-blog-body img {
    max-width: 100%;
    height: auto;
}

.bv-blog-linked-card {
    background: rgba(255, 255, 255, 0.65);
    border-left: 4px solid var(--bv-secondary);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0 4px 4px 0;
}

.bv-blog-empty-list {
    max-height: 16rem;
    overflow-y: auto;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 4px;
}

.bv-bottle-form .bv-cellar-id-available input {
    background-color: rgba(40, 167, 69, 0.25);
}

.bv-bottle-form .bv-cellar-id-taken input {
    background-color: rgba(220, 53, 69, 0.25);
}
