@import url('widgets.css');

/* FORM ROWS */

.form-row {
    overflow: hidden;
    padding: 10px;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

.form-row img, .form-row input {
    vertical-align: middle;
}

.form-row label input[type="checkbox"] {
    margin-top: 0;
    vertical-align: 0;
}

form .form-row p {
    padding-left: 0;
}

.hidden {
    display: none;
}

/* FORM LABELS */

/* Admin forms only - don't affect frontend forms */
.admin label,
.admin-form label {
    font-weight: normal;
    color: #666;
    font-size: 13px;
}

.required label, label.required {
    font-weight: bold;
    /*color: #333;*/
}

/* RADIO BUTTONS */

form ul.radiolist li {
    list-style-type: none;
}

form ul.radiolist label {
    float: none;
    display: inline;
}

form ul.radiolist input[type="radio"] {
    margin: -2px 4px 0 0;
    padding: 0;
}

form ul.inline {
    margin-left: 0;
    padding: 0;
}

form ul.inline li {
    float: left;
    padding-right: 7px;
}

/* ALIGNED FIELDSETS */

.aligned label {
    display: block;
    /*padding: 4px 10px 0 0;*/
    /*float: left;*/
    /*width: 160px;*/
    word-wrap: break-word;
    /*line-height: 1;*/
}

.aligned label:not(.vCheckboxLabel):after {
    /*content: '';*/
    display: inline-block;
    vertical-align: middle;
    height: 26px;
}

.aligned label + p, .aligned label + div.help, .aligned label + div.readonly {
    padding: 6px 0;
    margin-top: 0;
    margin-bottom: 0;
    /*margin-left: 170px;*/
}

.aligned ul label {
    display: inline;
    float: none;
    width: auto;
}

.aligned .form-row input {
    margin-bottom: 0;
}

.colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
    width: 350px;
}

/* form .aligned ul {
    margin-left: 160px;
    padding-left: 10px;
} */

form .aligned ul.radiolist {
    display: inline-block;
    margin: 0;
    padding: 0;
}

form .aligned p.help,
form .aligned div.help {
    clear: left;
    /*margin-top: 0;*/
    /*margin-left: 130px;*/
    /*padding-left: 3px;*/
}

form .aligned label + p.help,
form .aligned label + div.help {
    margin-left: 0;
    padding-left: 0;
}

form .aligned p.help:last-child,
form .aligned div.help:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

form .aligned input + p.help,
form .aligned textarea + p.help,
form .aligned select + p.help,
form .aligned input + div.help,
form .aligned textarea + div.help,
form .aligned select + div.help {
    /*margin-left: 160px;*/
    /*padding-left: 10px;*/
}

form .aligned ul li {
    /*list-style: none;*/
}
/* Admin forms only - don't affect frontend forms */
.admin input[type="text"],
.admin input[type="email"],
.admin input[type="password"],
.admin input[type="number"],
.admin textarea,
.admin select,
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form textarea,
.admin-form select {
    display: block;
    width: 100%;
    padding: 0.5rem 20px;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5rem;
    color: #495057;
    background-color: transparent;
    background-clip: padding-box;
    border: 1px solid #d2d6da;
    appearance: none;
    border-radius: 0.375rem;
    transition: 0.2s ease;
}

form .aligned table p {
    margin-left: 0;
    padding-left: 0;
}

.aligned .vCheckboxLabel {
    float: none;
    width: auto;
    display: inline-block;
    /*vertical-align: -3px;*/
    /*padding: 0 0 5px 5px;*/
}

.aligned .vCheckboxLabel + p.help,
.aligned .vCheckboxLabel + div.help {
    margin-top: -4px;
}

.colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
    width: 610px;
}

.checkbox-row p.help,
.checkbox-row div.help {
    margin-left: 0;
    padding-left: 0;
}

fieldset .fieldBox {
    float: left;
    margin-right: 20px;
}

/* WIDE FIELDSETS */

.wide label {
    width: 200px;
}

form .wide p,
form .wide input + p.help,
form .wide input + div.help {
    /*margin-left: 200px;*/
}

form .wide p.help,
form .wide div.help {
    /*padding-left: 38px;*/
}

form div.help ul {
    padding-left: 0;
    margin-left: 0;
}

.colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
    width: 450px;
}

/* COLLAPSED FIELDSETS */

fieldset.collapsed * {
    display: none;
}

fieldset.collapsed h2, fieldset.collapsed {
    display: block;
}

fieldset.collapsed {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

fieldset.collapsed h2 {
    background: #f8f8f8;
    color: #666;
}

fieldset .collapse-toggle {
    color: #fff;
}

fieldset.collapsed .collapse-toggle {
    background: transparent;
    display: inline;
    color: #447e9b;
}

/* MONOSPACE TEXTAREAS */

fieldset.monospace textarea {
    font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
}

/* SUBMIT ROW */

.submit-row {
    padding: 12px 14px;
    margin: 0 0 20px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    text-align: right;
    overflow: hidden;
}

body.popup .submit-row {
    overflow: auto;
}

.submit-row input {
    height: 35px;
    line-height: 15px;
    margin: 0 0 0 5px;
}

.submit-row input.default {
    margin: 0 0 0 8px;
    text-transform: uppercase;
}

.submit-row p {
    margin: 0.3em;
}

.submit-row p.deletelink-box {
    float: left;
    margin: 0;
}

.submit-row a.deletelink {
    display: block;
    background: #ba2121;
    border-radius: 4px;
    padding: 10px 15px;
    height: 15px;
    line-height: 15px;
    color: #fff;
}

.submit-row a.closelink {
    display: inline-block;
    background: #bbbbbb;
    border-radius: 4px;
    padding: 10px 15px;
    height: 15px;
    line-height: 15px;
    margin: 0 0 0 5px;
    color: #fff;
}

.submit-row a.deletelink:focus,
.submit-row a.deletelink:hover,
.submit-row a.deletelink:active {
    background: #a41515;
}

.submit-row a.closelink:focus,
.submit-row a.closelink:hover,
.submit-row a.closelink:active {
    background: #aaaaaa;
}

/* CUSTOM FORM FIELDS */

.vSelectMultipleField {
    vertical-align: top;
}

.vCheckboxField {
    border: none;
}

.vDateField, .vTimeField {
    margin-right: 2px;
    margin-bottom: 4px;
}

.vDateField {
    min-width: 6.85em;
}

.vTimeField {
    min-width: 4.7em;
}

.vURLField {
    width: 30em;
}

.vLargeTextField, .vXMLLargeTextField {
    width: 48em;
}

.flatpages-flatpage #id_content {
    height: 40.2em;
}

.module table .vPositiveSmallIntegerField {
    width: 2.2em;
}

.vTextField, .vUUIDField {
    width: 20em;
}

.vIntegerField {
    width: 5em;
}

.vBigIntegerField {
    width: 10em;
}

.vForeignKeyRawIdAdminField {
    width: 5em;
}

/* INLINES */

.inline-group {
    padding: 0;
    margin: 0 0 30px;
}

.inline-group thead th {
    padding: 8px 10px;
}

.inline-group .aligned label {
    width: 160px;
}

.inline-related {
    position: relative;
}

.inline-related h3 {
    margin: 0;
    /*color: #666;*/
    padding: 5px;
    font-size: 13px;
    /*background: #f8f8f8;*/
    /*border-top: 1px solid #eee;*/
    /*border-bottom: 1px solid #eee;*/
}

.inline-related h3 span.delete {
    float: right;
}

.inline-related h3 span.delete label {
    margin-left: 2px;
    font-size: 11px;
}

.inline-related fieldset {
    margin: 0;
    /*background: #fff;*/
    border: none;
    width: 100%;
}

.inline-related fieldset.module h3 {
    margin: 0;
    padding: 2px 5px 3px 5px;
    font-size: 11px;
    text-align: left;
    font-weight: bold;
    background: #bcd;
    color: #fff;
}

.inline-group .tabular fieldset.module {
    border: none;
}

.inline-related.tabular fieldset.module table {
    width: 100%;
}

.last-related fieldset {
    border: none;
}

.inline-group .tabular tr.has_original td {
    padding-top: 2em;
}

.inline-group .tabular tr td.original {
    padding: 2px 0 0 0;
    width: 0;
    _position: relative;
}

.inline-group .tabular th.original {
    width: 0px;
    padding: 0;
}

.inline-group .tabular td.original p {
    position: absolute;
    right: 0;
    /*height: 1.1em;*/
    /*padding: 2px 9px;*/
    overflow: hidden;
    font-size: 12px;
    font-weight: bold;
    /*color: #666;*/
    _width: 700px;
}

.inline-group ul.tools {
    padding: 0;
    margin: 0;
    list-style: none;
}

.inline-group ul.tools li {
    display: inline;
    padding: 0 5px;
}

.inline-group div.add-row,
.inline-group .tabular tr.add-row td {
    color: #666;
    background: #f2f4f6;
    padding: 8px 10px;
    /*border-bottom: 1px solid #eee;*/
}

.inline-group .tabular tr.add-row td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.inline-group ul.tools a.add,
.inline-group div.add-row a,
.inline-group .tabular tr.add-row td a {
    background: url(../img/icon-addlink.svg) 0 1px no-repeat;
    padding-left: 16px;
    font-size: 12px;
}

.empty-form {
    display: none;
}

/* RELATED FIELD ADD ONE / LOOKUP */

.add-another, .related-lookup {
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-size: 14px;
}

.add-another {
    width: 16px;
    height: 16px;
    background-image: url(../img/icon-addlink.svg);
}

.related-lookup {
    width: 16px;
    height: 16px;
    background-image: url(../img/search.svg);
}

form .related-widget-wrapper ul {
    display: inline-block;
    margin-left: 0;
    padding-left: 0;
}

.clearable-file-input input {
    margin-top: 0;
}
.table thead th {
    padding: 0.5rem 0.5rem !important;
}
.actions .btn {
    margin-bottom: 0 !important;
    padding: 12px;
}
.admin-add-btn li {
    list-style: none;
}

.admin-add-btn li a {
    /* margin-bottom: 1rem; */
    letter-spacing: -0.025rem;
    text-transform: uppercase;
    box-shadow: 0 4px 7px -1px rgba(0, 0, 0, 0.11), 0 2px 4px -1px rgba(0, 0, 0, 0.07);
    background: #82d616;
    margin: 0 7px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
}

.table tbody tr:last-child td {
    border-bottom: 1px solid #e9ecef;
}

/* Admin form specific - don't affect frontend forms */
.admin .form-check,
.admin-form .form-check {
    margin: 0;
    padding: 0;
    width: 0;
}
td.action-checkbox{
    width: 30px !important;
}

/* Radio button toggle fixes for mobile visual feedback - specific to registration type toggle */
.btn-group[aria-label="Registration type"] .btn-check:checked + .btn.btn-outline-primary {
  color: #fff !important;
  background-color: #cb0c9f !important;
  border-color: #cb0c9f !important;
  opacity: 1 !important;
}

.btn-group[aria-label="Registration type"] .btn-check:checked + .btn.btn-outline-secondary {
  color: #000 !important;
  background-color: #8392AB !important;
  border-color: #8392AB !important;
  opacity: 1 !important;
}

/* Ensure mobile devices properly show the active state - specific to registration type toggle */
@media (max-width: 768px) {
  .btn-group[aria-label="Registration type"] .btn-check:checked + .btn {
    color: var(--bs-btn-active-color) !important;
    background-color: var(--bs-btn-active-bg) !important;
    border-color: var(--bs-btn-active-border-color) !important;
    opacity: 1 !important;
  }
  
  .btn-group[aria-label="Registration type"] .btn-check:checked + .btn.btn-outline-primary {
    color: #fff !important;
    background-color: #cb0c9f !important;
    border-color: #cb0c9f !important;
  }
  
  .btn-group[aria-label="Registration type"] .btn-check:checked + .btn.btn-outline-secondary {
    color: #000 !important;
    background-color: #8392AB !important;
    border-color: #8392AB !important;
  }
}