/* Shared form presentation. Dimensions match addProperty.php's input-group-lg.
   Keep state/validation colors in style.css; do not resize hidden or choice inputs. */
:root {
    --jt-control-font-size: 1.09375rem;
    --jt-control-height: calc(2.640625rem + 2px);
    --jt-control-padding: .5rem 1rem;
}

body .form-control:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body .custom-select,
body .form-control-file,
body .custom-file-label {
    min-width: 0;
    min-height: var(--jt-control-height);
    padding: var(--jt-control-padding);
    font-size: var(--jt-control-font-size);
    line-height: 1.5;
    border-radius: 2px;
}

body input.form-control:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
body select.form-control:not([size]):not([multiple]),
body select.custom-select:not([size]):not([multiple]),
body .custom-file,
body .custom-file-input,
body .custom-file-label {
    height: var(--jt-control-height);
}

/* Use the reference page's arrow for ordinary and custom single selects. */
body select.form-control:not([multiple]):not([size]),
body select.custom-select:not([multiple]):not([size]) {
    padding-right: 2.5rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%239098ac'/%3E%3C/svg%3E");
    background-position: right .75rem center;
    background-size: 14px 8px;
    background-repeat: no-repeat;
}

body textarea.form-control,
body select.form-control[multiple],
body select.form-control[size],
body select.custom-select[multiple],
body select.custom-select[size] {
    height: auto;
}

body textarea.form-control {
    resize: vertical;
}

body .input-group > .input-group-prepend > :is(.input-group-text, .btn),
body .input-group > .input-group-append > :is(.input-group-text, .btn) {
    padding: var(--jt-control-padding);
    font-size: var(--jt-control-font-size);
    line-height: 1.5;
}

body .form-control-file {
    display: block;
    width: 100%;
    color: #4f5467;
    background-color: #fff;
    border: 1px solid #e9ecef;
}

body input[type="file"].form-control,
body .form-control-file {
    height: auto;
    max-width: 100%;
    overflow: hidden;
}

body input[type="file"]::file-selector-button {
    margin-right: .75rem;
    padding: .125rem .5rem;
    font: inherit;
    color: inherit;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 2px;
}

body .custom-file-label::after {
    height: calc(var(--jt-control-height) - 2px);
    padding: var(--jt-control-padding);
}

body :is(form, .modal-body) input:is([type="checkbox"], [type="radio"]):not(.custom-control-input) {
    width: 1rem;
    height: 1rem;
    vertical-align: -.125rem;
    accent-color: #7460ee;
}

body .form-group {
    margin-bottom: 1rem;
}

body .form-group > label:not(.form-check-label):not(.custom-control-label),
body label.control-label {
    margin-bottom: .5rem;
    font-size: .875rem;
    font-weight: 400;
}

/* Match the rounded section cards without changing dashboard/table cards. */
body form .card,
body form.card,
body .card:has(form) {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

body form .card > .card-body,
body form.card > .card-body,
body .card:has(form) > .card-body {
    padding: 1rem;
}

body form .section-title {
    padding-bottom: .5rem;
    border-bottom: 1px solid #e9ecef;
}

/* Use the same action size as the reference page; compact table/icon actions
   retain their intentional size. Grouped buttons are aligned above. */
body form .btn:not(.btn-sm):not(.btn-link):not(.btn-circle) {
    padding: .5rem 1rem;
    font-size: var(--jt-control-font-size);
    line-height: 1.5;
}
