/**
 * Returns form (/devoluciones). Same look as the checkout forms of the theme
 * (themes/warehousechild/assets/css/global.css: .ib-co-form, .ib-co-form__group--box, .ib-co-btn),
 * whose field styles are scoped to #checkout and are therefore repeated here for this page.
 *
 * @author MOD
 * @copyright 2026
 */

/* Centered column: title, intro and form share the same width */
.mod-returnform {
    max-width: 840px;
    margin: 0 auto 64px;
    color: #111827;
}

body.page-returnform .page-title {
    max-width: 840px;
    margin: 32px auto 16px;
    text-align: center;
}

.mod-returnform__intro {
    margin: 0 auto 40px;
    max-width: 640px;
    color: #5c5c5c;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

/* Privacy + submit centered at the end of the form */
.mod-returnform__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
}

.mod-returnform__footer .mod-returnform__btn {
    min-width: 240px;
}

@media (max-width: 767px) {
    body.page-returnform .page-title {
        margin-top: 16px;
    }

    .mod-returnform__intro {
        margin-bottom: 24px;
    }

    .mod-returnform__footer .mod-returnform__btn {
        width: 100%;
    }
}

/* Short fields in 3 columns (desktop), 1 column on phones */
.mod-returnform__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 16px;
}

.mod-returnform__field--wide {
    grid-column: span 2;
}

.mod-returnform__field--full {
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .mod-returnform__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mod-returnform__field--wide {
        grid-column: auto;
    }
}

/* Label above a full-width input */
.mod-returnform__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.mod-returnform__field > label {
    margin: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.mod-returnform__required {
    color: #a22222;
}

.mod-returnform .form-control {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    box-shadow: none;
}

.mod-returnform textarea.form-control {
    height: auto;
    min-height: 96px;
    padding: 12px 16px;
    resize: vertical;
}

.mod-returnform .form-control::placeholder {
    color: #5c5c5c;
}

.mod-returnform .form-control:focus {
    border-color: #000;
    outline: none;
}

.mod-returnform__file.form-control {
    height: auto;
    padding: 10px 16px;
}

.mod-returnform__hint {
    margin: 0;
    color: #5c5c5c;
    font-size: 13px;
}

/* Optional question blocks: grey box (.ib-co-form__group--box) */
.mod-returnform__heading {
    margin: 0;
    color: #000;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
}

/* Privacy checkbox (18px box, black when ticked) */
.mod-returnform__check {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

.mod-returnform__check input[type="checkbox"] {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #000;
    cursor: pointer;
}

.mod-returnform__check label {
    margin: 0;
    color: #111827;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.mod-returnform__check label a {
    color: #111827;
    text-decoration: underline;
}

/* Primary button: black, white on hover (same as .ib-co-btn) */
.mod-returnform__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border: 1px solid #000;
    border-radius: 16px;
    background: #000;
    color: #fff;
    font-size: 16px;
    line-height: 27px;
    text-transform: none;
    cursor: pointer;
}

/* The outline variant (a link) keeps the colours on hover: the theme editor forces a:link { color: #000 } */
.mod-returnform__btn:hover,
.mod-returnform__btn:focus,
.mod-returnform__btn--outline {
    background: #fff;
    color: #000;
    text-decoration: none;
}

/* Success / error messages */
.mod-returnform__notice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 8px;
    background: #f6f6f8;
    font-size: 14px;
}

.mod-returnform__notice p {
    margin: 0;
}

.mod-returnform__notice ul {
    margin: 0;
    padding: 0 0 0 18px;
}

.mod-returnform__notice--success {
    align-items: center;
    padding: 32px 16px;
    text-align: center;
}

.mod-returnform__notice--error {
    border: 1px solid #a22222;
    background: #fff;
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields) */
.mod-returnform__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
