.recipe-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.recipe-flow--card {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border-radius: 12px;
    padding: 1.75rem;
}

.recipe-loading--title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--color-accent-strong);
    margin: 0 0 0.35rem;
}

.recipe-loading--url {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 1.5rem;
}

.recipe-loading--step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-family: var(--font-sans);
    font-size: 14px;
}

.recipe-loading--icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--color-surface-subtle);
    font-size: 13px;
    line-height: 1;
}

.recipe-loading--step.is-done .recipe-loading--icon {
    background: var(--color-accent-soft);
    color: var(--color-accent-strong);
}

.recipe-loading--step.is-done span:last-child {
    color: var(--color-accent-strong);
}

.recipe-loading--icon-svg {
    width: 14px;
    height: 14px;
}

.recipe-loading--step.is-failed .recipe-loading--icon {
    color: var(--color-text-muted);
}

.recipe-loading--step.is-failed span:last-child {
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.recipe-loading--step.is-active .recipe-loading--icon {
    background: var(--color-accent-soft);
}

.recipe-loading--step.is-active span:last-child {
    color: var(--color-accent-strong);
}

.recipe-loading--step.is-pending span:last-child {
    color: var(--color-text-muted);
}

.recipe-loading--spinner {
    border: 2px solid var(--color-accent-soft);
    border-top-color: var(--color-accent-hover);
    animation: recipe-spin 0.8s linear infinite;
}

@keyframes recipe-spin {
    to { transform: rotate(360deg); }
}

.recipe-flow--actions {
    display: flex;
    gap: 10px;
}

.recipe-flow--actions .btn {
    flex: 1;
    text-align: center;
}

.recipe-flow--actions form.button_to {
    flex: 1;
    margin: 0;
}

.recipe-flow--actions form.button_to .btn {
    width: 100%;
}

.recipe-flow--actions .btn:disabled {
    color: var(--color-text-muted);
    border-color: var(--color-border);
    cursor: not-allowed;
    pointer-events: none;
}

.recipe-loading--error {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-danger);
    background: var(--color-danger-bg);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 1.25rem;
}

.recipe-preview--image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 0 1rem;
}

.recipe-preview--image-placeholder {
    background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-accent) 100%);
}

.recipe-preview--title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--color-accent-strong);
    margin: 0 0 0.5rem;
}

.recipe-preview--card .recipe-preview--image-wrap {
    position: relative;
}

/* Anchored bottom-left on the image, opposite corner from .recipe-preview--save
   — the two floating controls read as one consistent piece of chrome on the
   photo rather than unrelated overlays. Only rendered when the recipe has at
   least one rating; see .recipe-preview--rating-prompt for the empty state. */
.recipe-preview--rating {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: color-mix(in srgb, var(--color-bg) 92%, transparent);
    padding: 5px 9px;
    border-radius: 20px;
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--color-accent-strong);
    font-variant-numeric: tabular-nums;
}

.recipe-preview--rating svg path {
    fill: var(--color-accent);
    stroke: var(--color-accent);
}

/* Stays invisible at rest — an unrated recipe's photo is left completely
   clean rather than showing a hollow "0.0 (0)" — and only appears on hover,
   as a quiet invitation rather than a permanent prompt on every card. */
.recipe-preview--rating-prompt {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--color-bg) 85%, transparent);
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-style: italic;
    color: var(--color-text-muted);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.recipe-preview--card .recipe-preview--image-wrap:hover .recipe-preview--rating-prompt {
    opacity: 1;
}

.recipe-preview--card .recipe-preview--image {
    border-radius: 0;
    margin: 0;
    display: block;
}

.recipe-preview--card .recipe-preview--body {
    padding: 1rem 1.1rem 1.1rem;
}

/* Same cream-tinted glass as .recipe-preview--rating, opposite corner — one
   consistent floating-chrome material across both photo overlays. */
.recipe-preview--save {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-bg) 92%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent-strong);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.recipe-preview--save:hover {
    background: var(--color-bg);
}

.recipe-preview--save-menu {
    position: absolute;
    top: 48px;
    right: 10px;
    background: var(--color-surface);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    padding: 6px;
    z-index: 3;
}

.recipe-preview--save-option {
    display: block;
    margin: 0;
}

.recipe-preview--save-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-accent-strong);
    cursor: pointer;
}

.recipe-preview--save-option label:hover {
    background: var(--color-bg);
}

.recipe-preview--scope-row,
.recipe-preview--back-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-accent-strong);
    cursor: pointer;
    text-align: left;
}

.recipe-preview--scope-row:hover,
.recipe-preview--back-row:hover {
    background: var(--color-bg);
}

.recipe-preview--back-row {
    font-weight: 600;
    margin-bottom: 4px;
    justify-content: flex-start;
    gap: 6px;
}

.recipe-preview--manage-link {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px 4px;
    border: none;
    border-top: 1px solid var(--color-bg);
    background: none;
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--color-text-muted);
    text-decoration: underline;
    text-align: left;
    cursor: pointer;
}



.recipe-preview--save svg path {
    fill: none;
}

.recipe-preview--save.is-saved svg path {
    fill: currentColor !important;
}

.recipe-preview--source {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 0;
}

.recipe-collection--title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--color-accent-strong);
    margin: 0 0 0.75rem;
}

.recipe-collection--select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-accent-strong);
    background: var(--color-surface);
}

.recipe-collection--field {
    width: 100%;
    padding: 10px 12px;
    margin-top: 10px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-accent-strong);
    background: var(--color-surface);
    box-sizing: border-box;
    outline: none;
}

.recipe-collection--field:focus {
    border-color: var(--color-accent);
}

.recipe-collection--text-area {
    width: 100%;
    padding: 10px 12px;
    margin-top: 10px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-accent-strong);
    background: var(--color-surface);
    box-sizing: border-box;
    outline: none;
    resize: vertical;
    min-height: 90px;
}

.recipe-collection--text-area:focus {
    border-color: var(--color-accent);
}

.recipe-flow--viewport {
    overflow: hidden;
    transition: height 0.35s ease;
    animation: recipe-flow-reveal 0.4s ease;
}

.recipe-flow--track {
    display: flex;
    transition: transform 0.35s ease;
}

.recipe-flow--panel {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@keyframes recipe-flow-reveal {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.recipe-flow--dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 1.25rem;
}

.recipe-flow--dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-border);
    transition: background 0.2s ease;
}

.recipe-flow--dot.is-active {
    background: var(--color-accent);
}

.recipe-flow--dot.is-done {
    background: var(--color-accent-soft);
}

.recipe-new--form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recipe-new--divider {
    text-align: center;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 1.25rem 0 1rem;
}

.recipe-new--manual-btn {
    display: flex;
    justify-content: center;
    width: 100%;
}
