/* ── Variáveis de cor ──────────────────────────────────────────── */
:root {
    --wine:        #722f37;
    --wine-dark:   #5a2029;
    --wine-light:  #f9f0f1;
}

html, body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

h1:focus { outline: none; }

/* ── Cor vinho ───────────────────────────────────────────────────── */
.bg-wine           { background-color: var(--wine) !important; }
.text-wine         { color: var(--wine) !important; }

.btn-wine {
    background-color: var(--wine);
    border-color:     var(--wine);
    color: #fff;
}
.btn-wine:hover, .btn-wine:focus {
    background-color: var(--wine-dark);
    border-color:     var(--wine-dark);
    color: #fff;
}
.btn-wine:disabled {
    background-color: var(--wine);
    opacity: .65;
}

.btn-outline-wine {
    color:        var(--wine);
    border-color: var(--wine);
}
.btn-outline-wine:hover {
    background-color: var(--wine);
    color: #fff;
}

/* ── Layout ──────────────────────────────────────────────────────── */
.adega-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.adega-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding-top: 0.5rem;
}

/* ── Auth pages ──────────────────────────────────────────────────── */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
}

/* ── Cards de vinho / adega ──────────────────────────────────────── */
.hover-card {
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
}

/* ── Foto do vinho ───────────────────────────────────────────────────────── */
.wine-photo {
    height: 160px;
    object-fit: cover;
}

/* ── Avaliação com estrelas ──────────────────────────────────────── */
.star-row {
    display: flex;
    gap: .25rem;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
}
.star         { color: #ccc; transition: color .1s; }
.star.active  { color: #f5a623; }
.star:hover   { color: #f5a623; }

/* ── Validação Bootstrap ─────────────────────────────────────────── */
.valid.modified:not([type=checkbox])   { outline: 1px solid #28a745; }
.invalid.modified:not([type=checkbox]) { outline: 1px solid #dc3545; }
.validation-message                    { color: #dc3545; font-size: .875em; }

/* ── Loading progress (manter da template Blazor) ────────────────── */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}
.loading-progress circle {
    fill: none;
    stroke: var(--wine);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: #e0e0e0;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
/* Oculta o percentual de carregamento — mantém só o spinner */
.loading-progress-text {
    display: none;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
