html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5I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I2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Recipe-themed loading screen */
.recipe-loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.recipe-loading-spinner {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
}

.recipe-book-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: recipeBookSpin 3s linear infinite;
}

.recipe-icon {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    border-radius: 20px;
}

/* Recipe lines animation */
.recipe-line-1 {
    animation: recipeFillIn 2s ease-in-out infinite;
    animation-delay: 0s;
}

.recipe-line-2 {
    animation: recipeFillIn 2s ease-in-out infinite;
    animation-delay: 0.3s;
}

.recipe-line-3 {
    animation: recipeFillIn 2s ease-in-out infinite;
    animation-delay: 0.6s;
}

.recipe-check {
    animation: recipeCheckPulse 1.5s ease-in-out infinite;
}

.recipe-checkmark {
    animation: checkmarkDraw 2s ease-in-out infinite;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

/* Utensils orbiting animation */
.utensil-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: orbitRotate 8s linear infinite;
}

.utensil {
    position: absolute;
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: utensilFloat 2s ease-in-out infinite;
}

.utensil-1 {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.utensil-2 {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    animation-delay: 0.5s;
}

.utensil-3 {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 1s;
}

.utensil-4 {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    animation-delay: 1.5s;
}

.recipe-loading-text {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.recipe-loading-text h3 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #4ECDC4;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

.loading-progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ECDC4, #FF6B6B);
    border-radius: 2px;
    animation: progressFill 3s ease-in-out infinite;
}

/* Animations */
@keyframes recipeBookSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    25% { transform: translate(-50%, -50%) rotate(90deg) scale(1.1); }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(1); }
    75% { transform: translate(-50%, -50%) rotate(270deg) scale(1.1); }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

@keyframes recipeFillIn {
    0%, 100% { opacity: 0.3; transform: scaleX(0.3); }
    50% { opacity: 1; transform: scaleX(1); }
}

@keyframes recipeCheckPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

@keyframes checkmarkDraw {
    0% { stroke-dashoffset: 50; }
    50%, 100% { stroke-dashoffset: 0; }
}

@keyframes orbitRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes utensilFloat {
    0%, 100% { transform: translateY(-10px); }
    50% { transform: translateY(10px); }
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes progressFill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Legacy loading progress (fallback) */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Print styles */
.print-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.print-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
}

.print-header h1 {
    margin-bottom: 10px;
    font-size: 28px;
}

.print-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.print-section {
    margin-bottom: 25px;
}

.print-section h2 {
    font-size: 22px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.print-notes {
    white-space: pre-wrap;
    line-height: 1.5;
}

.print-details p {
    margin-bottom: 8px;
}

.print-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 12px;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

@media print {
    body {
        font-size: 12pt;
    }

    .no-print, .mud-appbar, .mud-drawer, .mud-breadcrumbs {
        display: none !important;
    }

    .print-container {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .print-header h1 {
        font-size: 24pt;
    }

    .print-section h2 {
        font-size: 18pt;
    }

    .print-details p {
        font-size: 12pt;
    }

    /* Ensure page breaks don't occur in the middle of sections */
    .print-section {
        page-break-inside: avoid;
    }
}