/* ── Submit recipe wizard ── */
.submit-recipe-page {
    padding-bottom: 4rem;
    background: var(--v2-cream, #faf8f5);
}

.submit-recipe-hero {
    padding: clamp(2.5rem, 6vw, 3.5rem) 0 1.75rem;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(232, 93, 4, 0.1), transparent),
        radial-gradient(ellipse 60% 50% at 100% 0%, rgba(45, 106, 79, 0.08), transparent),
        var(--v2-cream, #faf8f5);
}

.submit-recipe-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    color: var(--accent, #e85d04);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.submit-recipe-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    margin: 0 0 0.75rem;
}

.submit-recipe-lead {
    max-width: 640px;
    margin: 0 auto 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 1.05rem;
}

.submit-recipe-container {
    max-width: 920px;
    margin: 0 auto;
}

/* Progress */
.submit-progress-bar-wrap {
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.submit-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent, #e85d04), var(--v2-green, #2d6a4f));
    border-radius: 999px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-recipe-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .submit-recipe-progress {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.progress-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.progress-step.active {
    color: var(--text-primary);
    border-color: rgba(232, 93, 4, 0.35);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(232, 93, 4, 0.08);
    transform: translateY(-1px);
}

.progress-step.done {
    color: var(--v2-green, #2d6a4f);
    border-color: rgba(45, 106, 79, 0.25);
    background: rgba(45, 106, 79, 0.06);
}

.progress-step.active span {
    background: linear-gradient(135deg, var(--accent, #e85d04), #c44d03);
    color: #fff;
}

.progress-step.done span {
    background: var(--v2-green, #2d6a4f);
    color: #fff;
}

/* Form shell */
.submit-recipe-form {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    backdrop-filter: blur(12px);
}

.submit-panel {
    display: none;
    animation: submitPanelIn 0.35s ease;
}

.submit-panel.active {
    display: block;
}

@keyframes submitPanelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.panel-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.panel-top h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
}

.panel-hint {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

.panel-counter {
    flex-shrink: 0;
    min-width: 3.5rem;
    text-align: center;
    padding: 0.45rem 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(232, 93, 4, 0.12), rgba(45, 106, 79, 0.1));
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent, #e85d04);
}

/* Coach / help cards */
.coach-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.07), rgba(232, 93, 4, 0.05));
    border: 1px solid rgba(45, 106, 79, 0.12);
}

.coach-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.coach-body strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
}

.coach-body p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.coach-list {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Quick examples */
.quick-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.quick-examples-label {
    width: 100%;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.quick-example {
    border: 1px dashed rgba(232, 93, 4, 0.35);
    background: rgba(232, 93, 4, 0.04);
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.quick-example:hover {
    background: rgba(232, 93, 4, 0.12);
    border-color: var(--accent, #e85d04);
    transform: translateY(-1px);
}

/* Bulk paste */
.bulk-paste {
    margin-bottom: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    background: rgba(0, 0, 0, 0.02);
}

.bulk-paste summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    list-style: none;
}

.bulk-paste summary::-webkit-details-marker {
    display: none;
}

.bulk-paste textarea {
    width: 100%;
    margin-top: 0.75rem;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    resize: vertical;
    background: #fff;
}

.bulk-paste-actions {
    margin-top: 0.65rem;
    display: flex;
    gap: 0.5rem;
}

/* Ingredient / step builders */
.builder-columns {
    display: grid;
    gap: 0.5rem;
    padding: 0 0.5rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.ingredient-columns {
    grid-template-columns: 3.5rem 5.5rem 1fr 5.5rem;
}

.step-columns {
    grid-template-columns: 2.5rem 1fr 5.5rem;
}

@media (max-width: 640px) {
    .builder-columns {
        display: none;
    }
}

.ingredient-builder,
.step-builder {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.ingredient-row,
.step-row {
    display: grid;
    gap: 0.5rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ingredient-row:focus-within,
.step-row:focus-within {
    border-color: rgba(232, 93, 4, 0.4);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.ingredient-row {
    grid-template-columns: 3.5rem 5.5rem 1fr 5.5rem;
}

.step-row {
    grid-template-columns: 2.5rem 1fr 5.5rem;
}

@media (max-width: 640px) {
    .ingredient-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "qty unit"
            "name name"
            "actions actions";
    }

    .ingredient-row .ing-qty { grid-area: qty; }
    .ingredient-row .ing-unit { grid-area: unit; }
    .ingredient-row .ing-name { grid-area: name; }
    .ingredient-row .row-actions { grid-area: actions; justify-content: flex-end; }

    .step-row {
        grid-template-columns: 2.5rem 1fr;
        grid-template-areas:
            "num text"
            "actions actions";
    }

    .step-row .step-num { grid-area: num; }
    .step-row .step-text { grid-area: text; }
    .step-row .row-actions { grid-area: actions; justify-content: flex-end; }
}

.ingredient-row input,
.ingredient-row select,
.step-row textarea,
.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.92rem;
    transition: border-color 0.2s, background 0.2s;
}

.ingredient-row input:focus,
.ingredient-row select:focus,
.step-row textarea:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent, #e85d04);
    background: #fff;
}

.step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    background: linear-gradient(135deg, var(--accent, #e85d04), #c44d03);
    color: #fff;
    flex-shrink: 0;
}

.step-row textarea {
    min-height: 4.5rem;
    resize: vertical;
    line-height: 1.5;
}

.row-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

.row-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.row-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.row-btn.row-remove:hover {
    background: rgba(185, 28, 28, 0.1);
    color: #b91c1c;
}

.builder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1.15rem;
    border-radius: 999px;
    border: 1px dashed rgba(232, 93, 4, 0.45);
    background: rgba(232, 93, 4, 0.06);
    color: var(--accent, #e85d04);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-add-row:hover {
    background: rgba(232, 93, 4, 0.14);
    transform: translateY(-1px);
}

/* Form grids */
.form-grid-2,
.form-grid-3,
.form-grid-4 {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 720px) {
    .form-grid-2,
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.field > span {
    font-weight: 600;
    font-size: 0.92rem;
}

.field-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: -0.15rem 0 0;
    line-height: 1.45;
}

/* Photo upload */
.photo-upload-box {
    border: 2px dashed rgba(45, 106, 79, 0.25);
    border-radius: 16px;
    padding: 2rem 1.25rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(45, 106, 79, 0.04), transparent);
    transition: border-color 0.2s, background 0.2s;
}

.photo-upload-box.is-dragover {
    border-color: var(--accent, #e85d04);
    background: rgba(232, 93, 4, 0.06);
}

.photo-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.85;
}

.photo-upload-label {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent, #e85d04), #c44d03);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.photo-upload-box input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.cover-preview-wrap {
    margin-top: 1.25rem;
}

.cover-preview-wrap img {
    max-width: 100%;
    max-height: 320px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.upload-status {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0.75rem 0 0;
}

.photo-upload-limit {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0.35rem 0 0;
}

/* Photo gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.photo-gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.08);
    aspect-ratio: 1;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.photo-gallery-item.is-cover {
    border-color: var(--accent, #e85d04);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.15);
}

.photo-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-cover-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, var(--accent, #e85d04), #c44d03);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    z-index: 2;
}

.photo-gallery-actions {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    gap: 0.35rem;
    padding: 0.45rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-gallery-item:hover .photo-gallery-actions,
.photo-gallery-item:focus-within .photo-gallery-actions {
    opacity: 1;
}

.photo-set-cover {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 0.35rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
}

.photo-remove {
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 8px;
    background: rgba(185, 28, 28, 0.9);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.review-photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.review-photo-strip img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Review & nav */
.nutrition-details {
    margin-top: 0.5rem;
}

.nutrition-details summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.checkbox-field {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.65rem;
}

.checkbox-field input {
    width: auto;
    margin-top: 0.2rem;
}

.review-summary {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.review-summary ul {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
}

.review-note {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.submit-recipe-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.submit-form-error {
    color: #b91c1c;
    margin-top: 1rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    background: rgba(185, 28, 28, 0.08);
    border-radius: 10px;
}

.submit-honeypot {
    position: absolute;
    left: -9999px;
    height: 0;
    width: 0;
    opacity: 0;
}

.submit-success {
    padding: 2rem 0 4rem;
}

.submit-success-card {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
}
