.sale-form__section {
    border: 1px solid #dde1e6;
    border-radius: 5px;
    padding: 8px 12px 12px;
    margin-bottom: 12px;
}

.sale-form__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #7a828a;
    margin-bottom: 8px;
}

.sale-form__collapse-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.sale-form__collapse-toggle::-webkit-details-marker {
    display: none;
}

.sale-form__collapse-toggle .fa {
    display: inline-block;
    width: 10px;
    transition: transform 0.15s ease;
}

.sale-form__collapse-toggle:hover {
    color: #495057;
}

.sale-form__collapse[open] > .sale-form__collapse-toggle {
    margin-bottom: 8px;
}

.sale-form__collapse[open] > .sale-form__collapse-toggle .fa {
    transform: rotate(90deg);
}

.sale-form__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.sale-form__row + .sale-form__row {
    margin-top: 10px;
}

.sale-form__field {
    display: flex;
    flex-direction: column;
    flex: 1 1 130px;
    min-width: 0;
}

.sale-form__field--sm {
    flex: 0 1 180px;
}

.sale-form__field--md {
    flex: 0 1 260px;
}

.sale-form__field--wide {
    flex: 2 1 200px;
}

.sale-form__field--full {
    flex: 1 1 100%;
}

.sale-form__label {
    font-size: 11px;
    color: #6b7278;
    margin-bottom: 2px;
}

.sale-form__section input[type="text"],
.sale-form__section input[type="number"],
.sale-form__section select,
.sale-form__section textarea {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #212529;
    font-size: 13px;
    line-height: 20px;
}

/* Beats the global `select { height: 38px !important }` from cap/css/custom.css */
.sale-form__section select {
    height: 30px !important;
}

.sale-form__section textarea {
    resize: vertical;
}

.sale-form__section input:focus,
.sale-form__section select:focus,
.sale-form__section textarea:focus {
    outline: none;
    border-color: #6ea8fe;
    box-shadow: 0 0 0 2px rgba(110, 168, 254, 0.25);
}

.sale-form__checks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding-bottom: 5px;
}

.sale-form__check {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
}

.sale-form__check input {
    margin: 0;
    width: 1.5em;
    height: 1.5em;
    flex-shrink: 0;
}

.sale-form__check--corner {
    margin-left: auto;
    align-self: flex-start;
    padding-top: 2px;
}

.sale-form__group {
    flex: 1 1 280px;
    padding: 6px 10px 8px;
    border-radius: 4px;
    background: #f4f6f8;
}

.sale-form__group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.sale-form__group-head .sale-form__title {
    margin-bottom: 0;
}

.sale-form__check--muted {
    font-size: 11px;
    color: #6b7278;
}

.sale-form__pair {
    display: flex;
    gap: 5px;
}

.sale-form__pair > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.sale-form__pair > :last-child {
    flex: 0 0 90px;
}

.sale-form__subgroup {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #cfd4d9;
}

.sale-form__items {
    margin-top: 4px;
    margin-bottom: 10px;
}

.sale-form__item {
    background: #f4f6f8;
}

.sale-form__item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sale-form__icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #e3b5b8;
    border-radius: 4px;
    background: #fff;
    color: #dc3545;
    font-size: 12px;
    cursor: pointer;
}

.sale-form__icon-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.sale-form__add {
    padding: 5px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #212529;
    font-size: 13px;
    cursor: pointer;
}

.sale-form__add:hover {
    background: #eef1f4;
}

.sale-form__hidden {
    display: none;
}

.sale-form .errorlist {
    margin: 2px 0 0;
    padding: 0;
    font-size: 11px;
    color: #dc3545;
    list-style: none;
}

.sale-form #id_manager[disabled] {
    opacity: 0.5;
}
