/* Vicki Admin Global style */
.required:before {
    content: " * ";
    color: red;
}

.change-form textarea {
    height: 100%;
    min-height: 1.5em;
    padding: 0.8rem 0.5rem;
    border: 1px solid gray;
}

.change-form .radiolist {
    margin-top: 30px!important;
}

.change-form input[type=radio] + span,
.change-form .radiolist label span {
    position: relative;
    top: 8px;
    padding-left: 20px;
}

/* Registration -- IntervieweeIDPicture Admin edit page */


#intervieweeidpicture_form div.id-pic-detail {
    margin-left: 35px;
}

#intervieweeidpicture_form div.id-pic-detail div.missing-id-picture {
    display: none;
}

#intervieweeidpicture_form img.id-picture-viewing {
    max-width: 1800px;
    width: 960px;
    min-width: 200px;
}

#intervieweeidpicture_form img.id-picture-viewing.itp {
    max-width: 800px;
    width: 500px;
    min-width: 200px;
}

#intervieweeidpicture_form div.zoom-btns {
    margin-bottom: 20px;
}

#intervieweeidpicture_form div.zoom-btns input[type=button] {
    color: white;
    font-weight: bold;
    background-color: #0b97c4;
    margin-right: 20px;
}

#intervieweeidpicture_form #id_birth_date_verified label[for=id_birth_date_verified_0],
#intervieweeidpicture_form .valid-green {
    color: green;
    font-weight: bold;
}
#intervieweeidpicture_form #id_birth_date_verified label[for=id_birth_date_verified_1],
#intervieweeidpicture_form .invalid-red {
    color: red!important;
    font-weight: bold;
}


/* W/S/P QuestionSet List admin page, action: add_to_materials_buckets */
.add-to-materials-buckets {
    padding: 20px;
    background-color: #f9f9f9;
}

.add-to-materials-buckets ul li {
    font-size: small;
    margin-left: 10px;
    list-style-type: square;
}

.add-to-materials-buckets [type=checkbox] {
    position: relative;
    left: 0;
    opacity: 1;
    margin: 7px 10px;
}


/* Interviewee List admin page */
.field-get_statuses {
    display: inline-block;
    width: 110px;
    font-size: smaller;
}
.field-get_statuses .name-label  {
    width: 45px;
}
.field-get_statuses .obj-value .badge-success {
    color: green;
}
.field-get_statuses .obj-value .badge-danger {
    color: red;
}

/* MaterialsBucket edit admin page */
#materialsbucket_form textarea {
    width: 20%;
}

/* Admin -- Filter */

div#changelist-filter div.col.s12 {
    margin-top: 5px;
    margin-bottom: 10px;
    padding-right: 10px;
}

div#changelist-filter div.col.s12.daterange-filter {
    margin-top: 15px;
    margin-bottom: 7px;
    border-radius: 8px;
}

/* Each filter's label sits on its own line above the control. */
div#changelist-filter label.filter-label {
    display: block;
    width: 100%;
    margin: 0 0 4px 0;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    line-height: 1.4;
}

/* Option count rendered as a subtle pill next to the filter title. */
div#changelist-filter label.filter-label .filter-count {
    display: inline-block;
    margin-left: 6px;
    padding: 0 7px;
    background-color: #eaeaea;
    color: #666;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    line-height: 16px;
    vertical-align: 1px;
}

/* Normalize widths so every filter control fills the sidebar column. */
div#changelist-filter div.col.s12 > .select2-container,
div#changelist-filter div.col.s12 input[type="text"] {
    width: 100% !important;
    box-sizing: border-box;
    max-width: 100%;
}

/* Baseline styling for the date-picker text inputs so they match the selects. */
div#changelist-filter input[type="text"].datepicker {
    height: 28px;
    padding: 2px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 13px;
}

/* Two date inputs in a range: stack them with a small gap. */
div#changelist-filter div.daterange-filter input[type="text"].datepicker + input[type="text"].datepicker {
    margin-top: 6px;
}

/* Date-range filter Apply button */
div.daterange-picker-controls {
    margin-top: 10px;
}

div.daterange-picker-controls .btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid #417690;
    border-radius: 4px;
    background-color: #417690;
    color: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

div.daterange-picker-controls .btn:hover {
    background-color: #205067;
    border-color: #205067;
}

/* List Admin page, label:value display. E.g. InterviewHarvest List Admin page, column "Get Videos" */
.name-label {
    display: inline-block;
    width: 70%;
    white-space: nowrap;
}

.obj-value {
    display: inline-block;;
    width: 20%;
    white-space: nowrap;
}

/* InterviewHarvest List Admin */
td.field-get_see_items span,
td.field-get_wse_items span{
    display: inline;
    width: 225px;
}
td.field-get_see_items .name-label,
td.field-get_wse_items .name-label {
    width: 125px;
}

/* InterviewHarvest Detail Admin */
form#interviewharvest_form.change-form div.input-field label[for^=id_page_] {
    top: -40px;
}


/* Interviewer List Admin */
td.field-get_zoom_OAuth_info {
    display: block;
    width: 525px;
}
td.field-get_zoom_OAuth_info .name-label {
    width: 110px;
}
td.field-get_zoom_OAuth_info .obj-value {
    width: 380px;
}

/*form#interviewer_form div#id_locations_container {*/
/*    border: 1px solid #333333;*/
/*    box-shadow: 8px 8px 4px gray;*/
/*}*/

/*form#interviewer_form table.id_locations_container td {*/
/*    padding: 3px 5px;*/
/*}*/

.multiple-checkbox-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem;
    margin-top: 1px;
    margin-bottom: 1px;
    width: max-content;
    max-width: 100%;
}

.multiple-checkbox-label label {
    font-size: 12px;
}

/*
 * Legacy VickiCheckboxSelectMultiple markup used separate action-checkbox and
 * checkbox-label divs. Keep those inline too, in case a running server/template
 * cache still renders that shape.
 */
.multiple-checkbox-row .action-checkbox,
.multiple-checkbox-row .checkbox-label {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.multiple-checkbox-row .checkbox-label label {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    white-space: nowrap;
}

.multiple-checkbox-row .action-checkbox label.checkbox-block {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/*
 * VickiCheckboxSelectMultiple: one row per option.
 * Grid beats Django admin flex (forms.css / responsive) on nested .form-row inputs.
 */
.multiple-checkbox-row label.vicki-m2m-line.checkbox-block.vCheckboxLabel {
    display: grid !important;
    grid-template-columns: auto auto minmax(0, max-content);
    align-items: center;
    column-gap: 0.4rem;
    width: max-content !important;
    max-width: 100% !important;
    margin: 0;
    padding: 0 0.5rem 0 0 !important;
    float: none !important;
    cursor: pointer;
    line-height: 1.3;
    vertical-align: middle;
    box-sizing: border-box;
}

.multiple-checkbox-row label.vicki-m2m-line input[type="checkbox"] {
    grid-column: 1;
    flex: none !important;
    width: auto !important;
    max-width: 1.25rem !important;
    min-width: 0 !important;
    margin: 0 !important;
    justify-self: start;
}

.multiple-checkbox-row label.vicki-m2m-line .multiple-checkbox-block {
    grid-column: 2;
    flex: none !important;
    display: inline-block;
    vertical-align: middle;
    justify-self: start;
}

.multiple-checkbox-row label.vicki-m2m-line .multiple-checkbox-label-text {
    grid-column: 3;
    min-width: 0;
    font-size: 12px;
    padding-top: 0;
    white-space: nowrap;
}

/*
 * Interview types ManyToMany (grouped Available / Unavailable): multi-column grid
 * per group — interviewer, interview slot, referral code, coupon, materials, etc.
 * ID suffix matches main forms and inlines (e.g. id_foo-0-interview_types).
 */
.change-form .field-interview_types [id$="interview_types"] > div,
.change-form .field-support_interview_types [id$="support_interview_types"] > div {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    column-gap: 1rem;
    row-gap: 0.1rem;
    margin-bottom: 0.35rem;
}

.change-form .field-interview_types [id$="interview_types"] > div > label:first-child,
.change-form .field-support_interview_types [id$="support_interview_types"] > div > label:first-child {
    grid-column: 1 / -1;
    display: block !important;
    margin: 0 0 0.25rem 0;
    padding: 0 !important;
    font-weight: 600;
    font-size: 12px;
    color: #333;
    line-height: 1.25 !important;
}

/*
 * Broad fallback for any interview-type checkbox DOM Django/admin widgets emit:
 * force option wrappers/labels inline so the checkbox never sits above text.
 */
.change-form .field-interview_types [id$="interview_types"] > div > div,
.change-form .field-support_interview_types [id$="support_interview_types"] > div > div {
    display: flex !important;
    align-items: center !important;
    min-height: 1.35rem;
    margin-left: 1rem;
    width: max-content;
    max-width: 100%;
}

.change-form .field-interview_types [id$="interview_types"] input[type="checkbox"],
.change-form .field-support_interview_types [id$="support_interview_types"] input[type="checkbox"] {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 1.25rem !important;
    min-width: 0 !important;
    margin: 0 0.45rem 0 0 !important;
    vertical-align: middle !important;
}

.change-form .field-interview_types [id$="interview_types"] label,
.change-form .field-support_interview_types [id$="support_interview_types"] label {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.25 !important;
}

.change-form .field-interview_types [id$="interview_types"] input[type="checkbox"] + label,
.change-form .field-support_interview_types [id$="support_interview_types"] input[type="checkbox"] + label,
.change-form .field-interview_types [id$="interview_types"] input[type="checkbox"] ~ label,
.change-form .field-support_interview_types [id$="support_interview_types"] input[type="checkbox"] ~ label {
    display: inline !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    white-space: nowrap;
    vertical-align: middle !important;
}

[type="checkbox"]:checked + span.multiple-checkbox-block::before {
    width: 12px !important;
    height: 22px !important;
    border-top: transparent !important;
    border-left: transparent !important;
    border-right: 1.5px solid #477091 !important;
    border-bottom: 1.5px solid #477091 !important;
}

span.multiple-checkbox-block::before {
    width: 14px !important;
    height: 14px !important;
    border: 1.2px solid #5a5a5a !important;
}

.input-field .readonly {
    margin-top: 15px
}

label[for$=-clear_id] {
    width: 100px;
    display: inline-block;
    position: relative;
    left: 60px;
    top: -12px;
}

[type="checkbox"][name$=-clear] + span {
    padding-left: 25px;
    height: 18px;
}

/* SAO Interviewee List Admin */
td.field-all_k12_deliveries li {
    line-height: 12px;
}

/* Admin -- Collapsible left nav sidebar apps */
#nav-sidebar .collapsible-app > table > caption {
    position: relative;
    padding-right: 28px;
}

#nav-sidebar .nav-toggle-indicator {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 11px;
    color: inherit;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.15s ease;
    user-select: none;
}

#nav-sidebar .nav-toggle-indicator:hover {
    background-color: rgba(0, 0, 0, 0.12);
}

#nav-sidebar .nav-toggle-indicator::before {
    content: "\25BE"; /* down-pointing triangle */
    display: inline-block;
    transition: transform 0.15s ease;
}

#nav-sidebar .collapsed .nav-toggle-indicator::before {
    transform: rotate(-90deg);
}

#nav-sidebar .collapsed > table > tbody {
    display: none;
}

/*
 * jQuery UI datepicker popup — aligned with Django admin chrome (secondary teal
 * header like #header), not the loud yellow .calendar caption. Singleton #ui-datepicker-div.
 */

#ui-datepicker-div.ui-datepicker {
    width: auto;
    min-width: 16em;
    margin: 5px auto;
    padding: 0;
    font-size: 0.75rem;
    font-family: var(--font-family-primary);
    border: 1px solid rgba(65, 118, 144, 0.35);
    border-radius: 4px;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.06);
    background: var(--body-bg, #fff);
    color: var(--body-fg, #333);
    overflow: hidden;
}

#ui-datepicker-div .ui-datepicker-header {
    margin: 0;
    padding: 4px 2.35em;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(32, 80, 103, 0.55);
    background-color: var(--secondary, #417690);
    background-image: none;
    color: var(--primary-fg, #fff);
}

#ui-datepicker-div .ui-datepicker-title {
    line-height: 1;
}

#ui-datepicker-div .ui-datepicker-title select.ui-datepicker-month,
#ui-datepicker-div .ui-datepicker-title select.ui-datepicker-year {
    height: 26px;
    box-sizing: border-box;
    vertical-align: middle;
    margin: 0 2px;
    padding: 4px 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--body-fg, #333);
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

#ui-datepicker-div .ui-datepicker-title select:focus {
    outline: 2px solid rgba(121, 174, 200, 0.55);
    outline-offset: 1px;
}

/* Prev / next — soft contrast on teal header */

#ui-datepicker-div .ui-datepicker-prev,
#ui-datepicker-div .ui-datepicker-next {
    top: 50%;
    transform: translateY(-50%);
    width: 2em;
    height: 2em;
    border: none;
    border-radius: 4px;
    background-image: none;
    background-color: transparent;
}

#ui-datepicker-div a.ui-datepicker-prev:hover,
#ui-datepicker-div a.ui-datepicker-next:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

#ui-datepicker-div a.ui-datepicker-prev span.ui-icon,
#ui-datepicker-div a.ui-datepicker-next span.ui-icon {
    position: relative;
    left: auto;
    top: auto;
    margin: 0;
    width: 100%;
    height: 100%;
    background-image: none !important;
    text-indent: -9999px;
}

#ui-datepicker-div a.ui-datepicker-prev span.ui-icon::after,
#ui-datepicker-div a.ui-datepicker-next span.ui-icon::after {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-indent: 0;
    font-size: 1rem;
    font-weight: bold;
    color: var(--breadcrumbs-fg, #c4dce8);
}

#ui-datepicker-div a.ui-datepicker-prev:hover span.ui-icon::after,
#ui-datepicker-div a.ui-datepicker-next:hover span.ui-icon::after {
    color: var(--primary-fg, #fff);
}

#ui-datepicker-div a.ui-datepicker-prev span.ui-icon::after {
    content: "\2039";
}

#ui-datepicker-div a.ui-datepicker-next span.ui-icon::after {
    content: "\203A";
}

#ui-datepicker-div .ui-datepicker-calendar {
    margin: 0;
    border-collapse: collapse;
    width: 100%;
    background: var(--body-bg, #fff);
}

#ui-datepicker-div .ui-datepicker-calendar thead th {
    padding: 8px 5px;
    background: var(--darkened-bg, #f8f8f8);
    border-bottom: 1px solid var(--border-color, #ccc);
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--body-quiet-color, #666);
    text-align: center;
}

#ui-datepicker-div .ui-datepicker-calendar tbody td {
    padding: 0;
    border-top: 1px solid var(--hairline-color, #e8e8e8);
}

#ui-datepicker-div .ui-datepicker-calendar tbody td .ui-state-default {
    display: block;
    box-sizing: border-box;
    border: none;
    background: none transparent;
    font-weight: 400;
    font-size: 0.75rem;
    padding: 6px;
    text-align: center;
    color: var(--body-quiet-color, #666);
    text-decoration: none;
}

#ui-datepicker-div .ui-datepicker-calendar tbody td .ui-state-hover {
    border: none;
    background: rgba(121, 174, 200, 0.45);
    color: var(--body-fg, #333);
}

#ui-datepicker-div .ui-datepicker-calendar tbody td .ui-state-active {
    border: none;
    background: var(--secondary, #417690);
    color: var(--primary-fg, #fff);
    font-weight: 600;
}

#ui-datepicker-div .ui-datepicker-calendar tbody td.ui-datepicker-today:not(.ui-datepicker-current-day) .ui-state-default {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px rgba(121, 174, 200, 0.8);
}

#ui-datepicker-div .ui-datepicker-calendar tbody td.ui-datepicker-other-month .ui-state-default {
    opacity: 0.45;
}

/* Admin DateTimeField time input replacement: hour/minute selectors */
.change-form .hm-time-selectors {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    vertical-align: middle;
}

.change-form .hm-time-selectors .hm-time-select {
    min-width: 68px;
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    padding: 0 8px;
    font-size: 13px;
    line-height: 1.2;
}

.change-form .hm-time-selectors .hm-time-separator {
    color: #555;
    font-weight: 600;
    line-height: 1;
}

/* Keep the original input in the DOM for Django form submission/parsing. */
.change-form input.vTimeField.hm-time-enhanced {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

