/* ==========================================================================
   Global uppercase display layer.

   To disable portal-wide: remove the uppercase.css <link> from _Layout.cshtml.
   To exempt one field or column: add class="no-uppercase" to it.

   Grid columns are configured in the database rather than the views, so email
   cells inside grids are exempted at runtime by uppercase.js instead.

   Note the split inside dropdowns: the option list and the selected value are
   uppercased, but the filter box a user types into is not.
   ========================================================================== */

/* --- Grid cells and headers -------------------------------------------- */
.e-grid .e-rowcell:not(.no-uppercase),
.e-grid .e-detailcell .e-rowcell:not(.no-uppercase),
.e-grid .e-templatecell:not(.no-uppercase),
.e-grid .e-headercelldiv:not(.no-uppercase),
.e-grid .e-columnheader .e-headertext:not(.no-uppercase) {
    text-transform: uppercase;
}

/* --- Labels ------------------------------------------------------------ */
label:not(.no-uppercase),
.col-form-label:not(.no-uppercase),
.form-label:not(.no-uppercase),
legend:not(.no-uppercase),
.fs-title:not(.no-uppercase),
.fs-label:not(.no-uppercase),
/* Column labels on the hand-built tables (productTable, detail templates) */
table th:not(.no-uppercase) {
    text-transform: uppercase;
}

/* --- Free-text form fields -------------------------------------------- */
input[type="text"]:not(.no-uppercase),
input:not([type]):not(.no-uppercase),
textarea:not(.no-uppercase) {
    text-transform: uppercase;
}

/* --- Dropdowns: native ------------------------------------------------- */
select:not(.no-uppercase),
select:not(.no-uppercase) option,
select:not(.no-uppercase) optgroup {
    text-transform: uppercase;
}

/* --- Dropdowns: Syncfusion -------------------------------------------- */
/* Option list, selected value, and multiselect chips. */
.e-popup .e-list-item:not(.no-uppercase),
.e-dropdownbase .e-list-item:not(.no-uppercase),
.e-popup .e-list-group-item:not(.no-uppercase),
.e-ddl input.e-input:not(.no-uppercase),
.e-multi-select-wrapper .e-chipcontent:not(.no-uppercase),
.e-multiselect .e-delim-values:not(.no-uppercase) {
    text-transform: uppercase;
}

/* --- Dropdowns: bootstrap-multiselect --------------------------------- */
.multiselect-selected-text:not(.no-uppercase),
.multiselect-container label:not(.no-uppercase) {
    text-transform: uppercase;
}

/* --- Never uppercase --------------------------------------------------- */
/* Kept as separate rules on purpose: CSS drops an entire selector list if
   any one selector in it is invalid, and these exclusions are the safety
   net. Splitting them means one bad selector cannot take the rest down. */

/* The explicit opt-out */
.no-uppercase {
    text-transform: none !important;
}

/* Field types where case is meaningful */
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="url"],
input[type="tel"],
input[type="search"],
input[type="file"] {
    text-transform: none !important;
}

/* Boxes the user types into to search or filter. Uppercasing these fights
   what is being typed and, for grid search, confuses the match. */
.e-grid .e-searchinput,
.e-grid .e-filtertext,
.e-input-group input[type="search"],
.e-filter-parent input,
.multiselect-search {
    text-transform: none !important;
}

.e-grid .e-columnchooser-wrap input {
    text-transform: none !important;
}

.e-multi-select-wrapper input.e-dropdownbase {
    text-transform: none !important;
}

.multiselect-container .multiselect-filter input {
    text-transform: none !important;
}

/* Rich text and date widgets own their own content */
.flatpickr-input,
.flatpickr-calendar,
.ql-editor {
    text-transform: none !important;
}

/* Known email fields (text inputs, so the type selectors above miss them) */
#email,
#emailr,
#Email,
#ParentEmail,
#EditParentEmail {
    text-transform: none !important;
}

/* Declares no type, so it falls under the bare-input rule above. Case is
   significant for credential checks. */
#AdminPassword {
    text-transform: none !important;
}
