/*
 * Matsnakk.no – fase 3A korrigering
 * Beholder kun nederste sticky handlingsrad synlig på lange oppskriftsskjemaer.
 * Originalknappene skjules visuelt, men beholdes i DOM slik at eksisterende lagringslogikk fortsatt brukes.
 */

.mn-recipe-form-action-dock {
    position: sticky;
    bottom: 0;
    z-index: 70;
    margin: 2rem 0 0;
    padding: .85rem clamp(.8rem, 2vw, 1.1rem);
    border: 1px solid rgba(92, 58, 34, .18);
    border-radius: 18px 18px 0 0;
    background:
        linear-gradient(135deg, rgba(255, 250, 241, .97), rgba(247, 242, 234, .95));
    box-shadow: 0 -14px 34px rgba(43, 28, 18, .16);
    backdrop-filter: blur(14px);
}

.mn-recipe-form-action-dock__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1180px;
    margin: 0 auto;
}

.mn-recipe-form-action-dock__copy {
    min-width: 0;
}

.mn-recipe-form-action-dock__copy strong {
    display: block;
    color: #241913;
    font-size: .98rem;
    line-height: 1.2;
}

.mn-recipe-form-action-dock__copy small {
    display: block;
    margin-top: .18rem;
    color: #6a594c;
    font-size: .82rem;
    line-height: 1.25;
}

.mn-recipe-form-action-dock__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6rem;
}

.mn-recipe-form-action-dock__button {
    appearance: none;
    border: 1px solid rgba(92, 58, 34, .16);
    border-radius: 999px;
    padding: .72rem 1rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.mn-recipe-form-action-dock__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(43, 28, 18, .14);
}

.mn-recipe-form-action-dock__button--draft {
    background: rgba(168, 102, 58, .11);
    color: #7a4928;
    border-color: rgba(168, 102, 58, .28);
}

.mn-recipe-form-action-dock__button--submit {
    background: linear-gradient(135deg, #075642, #0d6b53);
    color: #fff;
    border-color: rgba(255,255,255,.20);
    box-shadow: 0 10px 22px rgba(7, 86, 66, .18);
}

.mn-recipe-form-action-dock__button--disabled,
.mn-recipe-form-action-dock__button:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/*
 * Skjul original øvre knapperad når sticky dock er aktiv.
 * Knappene fjernes ikke og settes ikke disabled.
 * JS bruker fortsatt originalknappene for submit/draft.
 */
form[data-mn-recipe-action-dock="1"] .mn-phase3a-original-action-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

form[data-mn-recipe-action-dock="1"] .mn-phase3a-original-action-row-hidden {
    display: none !important;
}

@media (max-width: 760px) {
    .mn-recipe-form-action-dock {
        margin-left: calc(-1 * clamp(.75rem, 3vw, 1rem));
        margin-right: calc(-1 * clamp(.75rem, 3vw, 1rem));
        border-radius: 16px 16px 0 0;
    }

    .mn-recipe-form-action-dock__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .mn-recipe-form-action-dock__buttons {
        justify-content: stretch;
    }

    .mn-recipe-form-action-dock__button {
        flex: 1 1 160px;
    }
}


/* MN_PHASE3A_SINGLE_ROW_BUTTON_COLOR_FIX_V1
 * Fargekorrigering: global knappestil må ikke overstyre handlingsraden.
 * Utkast = kobber/lys, innsending = grønn/hovedhandling.
 */
.mn-recipe-form-action-dock .mn-recipe-form-action-dock__button.mn-recipe-form-action-dock__button--draft {
    background: linear-gradient(135deg, rgba(255, 250, 241, .98), rgba(245, 231, 217, .96)) !important;
    color: #7a4928 !important;
    border: 1px solid rgba(168, 102, 58, .38) !important;
    box-shadow: 0 8px 18px rgba(168, 102, 58, .10) !important;
}

.mn-recipe-form-action-dock .mn-recipe-form-action-dock__button.mn-recipe-form-action-dock__button--draft:hover {
    background: linear-gradient(135deg, #f8efe4, #efd8c2) !important;
    color: #63361d !important;
}

.mn-recipe-form-action-dock .mn-recipe-form-action-dock__button.mn-recipe-form-action-dock__button--submit {
    background: linear-gradient(135deg, #075642, #0d6b53) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    box-shadow: 0 10px 24px rgba(7, 86, 66, .22) !important;
}

.mn-recipe-form-action-dock .mn-recipe-form-action-dock__button.mn-recipe-form-action-dock__button--submit:hover {
    background: linear-gradient(135deg, #064d3b, #0a7659) !important;
    color: #ffffff !important;
}

