/* Settings page. Units of measurement is one block; later blocks stack beside it. */

.wms-settings {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 46rem;
}

.wms-units {
    --wms-units-ink: #1f2937;
    --wms-units-muted: #5e6c84;
    --wms-units-line: #dde2eb;
    --wms-units-green: #1b7a48;
    --wms-units-focus: rgba(31, 122, 77, 0.16);
}

.wms-units__title {
    margin: 0;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #eef1f4;
    color: var(--wms-units-ink);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.wms-units__lead {
    margin: 0;
    padding: 0.85rem 1.1rem 0;
    color: var(--wms-units-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.wms-units__error {
    margin: 0.35rem 0 0;
    color: #9b2c2c;
    font-size: 0.75rem;
    line-height: 1.4;
}

.wms-units__card {
    overflow: hidden;
    border: 1px solid var(--wms-units-line);
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.06);
    container-type: inline-size;
}

.wms-units__fields {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem 1rem;
}

.wms-units__field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.wms-units__field-head .form-label {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
    color: var(--wms-units-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
}

.wms-units select.form-control {
    width: 16.25rem;
    max-width: 100%;
    flex: 0 0 auto;
    min-height: 2.25rem;
    padding: 0.3rem 2rem 0.3rem 0.75rem;
    border: 1px solid var(--wms-units-line);
    border-radius: 0.5rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%235e6c84' d='M3.2 5.7 8 10.5l4.8-4.8.9.9L8 12.3 2.3 6.6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 0.7rem;
    appearance: none;
    box-shadow: none;
    color: var(--wms-units-ink);
    font-size: 0.875rem;
    line-height: 1.35;
    cursor: pointer;
}

.wms-units select.form-control:hover {
    border-color: #b7c2d0;
    background-color: #fff;
}

.wms-units select.form-control:focus {
    border-color: var(--wms-units-green);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--wms-units-focus);
    outline: 0;
}

#wms-currency-modal .modal-dialog,
#wms-volume-modal .modal-dialog,
#wms-dimensions-modal .modal-dialog,
#wms-weight-modal .modal-dialog {
    max-width: 28rem;
}

#wms-currency-modal .wms-currency-modal__help,
#wms-volume-modal .wms-currency-modal__help,
#wms-dimensions-modal .wms-currency-modal__help,
#wms-weight-modal .wms-currency-modal__help {
    margin: 0.85rem 0 0.75rem;
    color: #5e6c84;
    font-size: 0.8125rem;
    line-height: 1.45;
}

#wms-currency-modal .wms-currency-modal__row,
#wms-volume-modal .wms-currency-modal__row,
#wms-dimensions-modal .wms-currency-modal__row,
#wms-weight-modal .wms-currency-modal__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
    font-size: 0.875rem;
}

#wms-currency-modal .wms-currency-modal__label,
#wms-volume-modal .wms-currency-modal__label,
#wms-dimensions-modal .wms-currency-modal__label,
#wms-weight-modal .wms-currency-modal__label {
    color: #5e6c84;
}

#wms-currency-modal .wms-currency-modal__value,
#wms-volume-modal .wms-currency-modal__value,
#wms-dimensions-modal .wms-currency-modal__value,
#wms-weight-modal .wms-currency-modal__value {
    color: #1f2937;
    font-weight: 600;
    text-align: right;
}

#wms-currency-modal .wms-currency-modal__equation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#wms-currency-modal .wms-currency-modal__equation input {
    width: 8.5rem;
}

@container (max-width: 34rem) {
    .wms-units__field-head {
        flex-direction: column;
        align-items: stretch;
    }

    .wms-units__field-head .form-label {
        margin-bottom: 0.35rem;
    }

    .wms-units select.form-control {
        width: 100%;
    }
}
