//
// OpenMage
//
// This source file is subject to the Academic Free License (AFL 3.0)
// that is bundled with this package in the file LICENSE_AFL.txt.
// It is also available at https://opensource.org/license/afl-3-0-php
//
// @category    design
// @package     rwd_default
// @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
// @copyright   Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
// @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
//

@import "framework";

/* ============================================ *
 * SCAFFOLD FORM
 * ============================================ */

/* Scaffolding can not be applied globally to all forms, since some forms are best displayed in a stacked layout */

.scaffold-form {
    .form-list > li {
        display: block;

        &:after {
            @include clearfix;
        }
    }

    .fields {
        margin: 0;
        padding: 0;
        &:after {
            @include clearfix;
        }
    }

    .fields > .fields,
    .field,
    .wide,
    .control {
        margin-bottom: 7px;
        &:after {
            @include clearfix;
        }
    }

    label:first-child {
        float: left;
        width: 135px;
        padding: 7px 8px 0 0;
    }

    select,
    textarea,
    input[type=email],
    input[type=search],
    input[type=number],
    input[type=password],
    input[type=tel],
    input[type=text] {
        width: 330px;
        max-width: 100%;
    }

    .input-box {
        float: left;
        max-width: 350px;
    }

    .buttons-set {
        padding-top: 5px;
    }
}

@include bp(max-width, $bp-small) {

    .scaffold-form {

        label:first-child {
            float: none;
            width: auto;
            padding: 0;
        }

        .input-box {
            float: none;
            max-width: 100%;
        }
        .control .input-box {
            clear: none;
            float: left;
            display: inline;
            width: auto;
        }
        .control label:first-child {
            float: left;
        }
    }
}
