/* =========================================================
   DMEO EOI FORM - CLEAN FINAL CSS
   Yes / No intentionally kept vertical
   ========================================================= */


/* =========================================================
   PAGE LAYOUT
   ========================================================= */

#page-main-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
}

.block-content h1 {
  text-align: center;
}

.sidebar-left,
.floating-icons {
    display: none !important;
}


/* =========================================================
   INTRO
   ========================================================= */

.eoi-intro {
    margin-bottom: 20px;
}

.eoi-intro ul {
    margin-left: 30px !important;
}


/* =========================================================
   MAIN FORM
   ========================================================= */

#eoi-form {
    width: 100%;
    max-width: 1000px;

    margin: 18px auto 35px;
    padding: 24px 30px;

    background: #fff;
    border: 1px solid #dedede;
    border-radius: 6px;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);

    box-sizing: border-box;
}


/* =========================================================
   NORMAL FORM ITEMS
   ========================================================= */

#eoi-form .form-item {
    position: relative;

    margin: 0 0 18px !important;
    padding: 0 !important;
}


/* =========================================================
   NORMAL LABELS
   ========================================================= */

#eoi-form .form-item > label {
    /* display: block !important; */

    margin: 0 0 5px !important;
    padding: 0 !important;

    color: #222 !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    line-height: 1.35 !important;
}


/* =========================================================
   REQUIRED STAR - NORMAL FIELDS
   ========================================================= */

/* Hide Drupal's original star */
#eoi-form .form-item > label .form-required {
    display: none !important;
}


/* Add star only to fields having required attribute */
#eoi-form .form-item:has(input[required]) > label::after,
#eoi-form .form-item:has(select[required]) > label::after,
#eoi-form .form-item:has(textarea[required]) > label::after {
    content: " *";

    color: #d62828 !important;
    font-weight: 700 !important;
}


/* =========================================================
   INPUTS / SELECTS
   ========================================================= */

#eoi-form input[type="text"],
#eoi-form input[type="email"],
#eoi-form input[type="tel"],
#eoi-form input[type="url"],
#eoi-form input[type="number"],
#eoi-form input[type="month"],
#eoi-form select {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: 38px !important;
    min-height: 38px !important;

    padding: 7px 10px !important;

    border: 1px solid #cfcfcf !important;
    border-radius: 4px !important;

    background: #fff !important;
    color: #222 !important;

    font-size: 13px !important;
    line-height: 1.3 !important;

    box-sizing: border-box !important;
}


/* =========================================================
   TEXTAREA
   ========================================================= */

#eoi-form textarea {
    display: block !important;

    width: 100% !important;

    min-height: 90px !important;

    padding: 8px 10px !important;

    border: 1px solid #cfcfcf !important;
    border-radius: 4px !important;

    background: #fff !important;
    color: #222 !important;

    font-size: 13px !important;

    resize: vertical !important;

    box-sizing: border-box !important;
}


/* =========================================================
   INPUT FOCUS
   ========================================================= */

#eoi-form input:focus,
#eoi-form select:focus,
#eoi-form textarea:focus {
    border-color: #6da52f !important;

    outline: none !important;

    box-shadow: 0 0 0 2px rgba(109, 165, 47, 0.12) !important;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

#eoi-form .description {
    margin-top: 5px !important;
    margin-bottom: 0 !important;

    color: #666 !important;

    font-size: 11px !important;
    line-height: 1.35 !important;
}


/* =========================================================
   FIELDSET / YES-NO QUESTION
   ========================================================= */

#eoi-form fieldset {
    width: 100% !important;

    margin: 0 0 20px !important;
    padding: 0 !important;

    border: 0 !important;
}


/* =========================================================
   QUESTION / LEGEND
   ========================================================= */

#eoi-form fieldset > legend {
    display: block !important;

    width: 100% !important;

    margin: 0 0 8px !important;
    padding: 0 0 5px !important;

    color: #222 !important;

    background: transparent !important;
    border-bottom: 1px solid #eeeeee !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    line-height: 1.35 !important;

    box-sizing: border-box !important;
}


/* Keep question black even when validation error exists */

#eoi-form fieldset.error > legend,
#eoi-form fieldset.has-error > legend,
#eoi-form fieldset.form-item--error > legend,
#eoi-form .form-item--error > legend,
#eoi-form fieldset.error .fieldset-legend,
#eoi-form fieldset.form-item--error .fieldset-legend {
    color: #222 !important;
    background: transparent !important;
}


/* =========================================================
   REQUIRED STAR - YES / NO QUESTION
   ========================================================= */

/*
   We are adding the star through CSS because
   Drupal may not render .form-required for the fieldset.
*/

#eoi-form fieldset > legend::after {
    content: " *";

    color: #d62828 !important;
    font-weight: 700 !important;
}


/* =========================================================
   YES / NO RADIO CONTAINER
   ========================================================= */

/*
   IMPORTANT:
   Yes / No intentionally kept VERTICAL for now.
*/

#eoi-form fieldset .form-radios {
    display: block !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* =========================================================
   INDIVIDUAL YES / NO OPTION
   ========================================================= */

#eoi-form fieldset .form-radios .form-type-radio,
#eoi-form fieldset .form-radios .form-item,
#eoi-form fieldset .form-radios .js-form-item {
    display: flex !important;

    align-items: center !important;

    width: 100% !important;
    min-width: 0 !important;

    height: auto !important;

    margin: 0 0 10px !important;
    padding: 0 !important;

    position: static !important;
}


/* =========================================================
   RADIO BUTTON
   ========================================================= */

#eoi-form fieldset .form-radios input[type="radio"] {
    display: inline-block !important;

    position: static !important;
    float: none !important;

    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;

    margin: 0 7px 0 0 !important;
    padding: 0 !important;

    cursor: pointer !important;

    vertical-align: middle !important;

    accent-color: #6da52f;
}


/* =========================================================
   YES / NO LABEL
   ========================================================= */

#eoi-form fieldset .form-radios label,
#eoi-form fieldset .form-radios .form-type-radio label,
#eoi-form fieldset .form-radios .form-item label,
#eoi-form fieldset .form-radios .js-form-item label {
    display: inline-block !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #222 !important;

    background: transparent !important;
    border: 0 !important;

    font-size: 13px !important;
    font-weight: 500 !important;

    line-height: 17px !important;

    position: static !important;
    float: none !important;

    white-space: nowrap !important;

    cursor: pointer !important;
}


/* =========================================================
   RADIO DESCRIPTION
   ========================================================= */

#eoi-form fieldset .description {
    display: block !important;

    margin-top: 8px !important;
    margin-bottom: 0 !important;

    color: #666 !important;

    font-size: 11px !important;
    line-height: 1.35 !important;
}


/* =========================================================
   NORMAL JS ERROR
   ========================================================= */

#eoi-form .js-error {
    display: block !important;

    width: 100% !important;

    margin: 5px 0 0 !important;
    padding: 6px 9px !important;

    background: #fff1f0 !important;

    color: #b42318 !important;

    border-left: 3px solid #d62828 !important;
    border-radius: 2px !important;

    font-size: 11px !important;
    line-height: 1.3 !important;

    box-sizing: border-box !important;
}


/* =========================================================
   RADIO / BACKEND ERROR
   ========================================================= */

#eoi-form fieldset > .js-error,
#eoi-form fieldset .radio-error,
#eoi-form fieldset .backend-error {
    display: block !important;

    width: 100% !important;

    margin: 7px 0 0 !important;
    padding: 6px 9px !important;

    background: #fff1f0 !important;

    color: #b42318 !important;

    border-left: 3px solid #d62828 !important;
    border-radius: 2px !important;

    font-size: 11px !important;
    line-height: 1.3 !important;

    box-sizing: border-box !important;
}


/* =========================================================
   NEVER MAKE LABELS RED
   ========================================================= */

#eoi-form .form-item--error > label,
#eoi-form .form-item--error > label *,
#eoi-form .form-item--error label,
#eoi-form .form-item--error legend,
#eoi-form .form-item--error legend *,
#eoi-form fieldset.error label,
#eoi-form fieldset.error legend,
#eoi-form fieldset.error legend * {
    color: #222 !important;
}


/* Required star must remain RED */

#eoi-form .form-item--error > label .form-required,
#eoi-form .form-item--error label .form-required,
#eoi-form fieldset.error legend .form-required,
#eoi-form fieldset.form-item--error legend .form-required {
    color: #d62828 !important;
}


/* =========================================================
   ERROR INPUT BORDER
   ========================================================= */

#eoi-form .form-item--error input,
#eoi-form .form-item--error select,
#eoi-form .form-item--error textarea {
    border-color: #d62828 !important;
}


/* =========================================================
   ACADEMIC YEAR
   ========================================================= */

#eoi-form input[name="current_academic_year"] {
    height: 38px !important;

    background: #fff !important;

    cursor: pointer !important;
}


/* =========================================================
   ACADEMIC YEAR PICKER
   ========================================================= */

#eoi-form .academic-year-picker {
    position: absolute !important;

    z-index: 99999 !important;

    top: 100%;
    left: 0;

    width: 350px;
    max-width: calc(100vw - 30px);

    margin-top: 6px;
    padding: 14px;

    background: #fff;

    border: 1px solid #d5d5d5;
    border-radius: 6px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);

    box-sizing: border-box;
}


/* Picker title */

#eoi-form .academic-picker-title {
    margin: 0 0 10px;
    padding-bottom: 7px;

    border-bottom: 1px solid #eee;

    color: #222;

    font-size: 14px;
    font-weight: 600;
}


/* Picker row */

#eoi-form .academic-picker-row {
    display: flex;

    align-items: flex-end;

    gap: 8px;
}


/* From / To columns */

#eoi-form .academic-picker-col {
    flex: 1;

    min-width: 0;
}


/* Picker labels */

#eoi-form .academic-picker-col label {
    display: block;

    margin-bottom: 5px;

    color: #555;

    font-size: 12px;
    font-weight: 600;
}


/* Month inputs */

#eoi-form .academic-picker-col input[type="month"] {
    width: 100% !important;

    height: 36px !important;
    min-height: 36px !important;

    padding: 6px 8px !important;

    font-size: 12px !important;

    box-sizing: border-box !important;
}


/* To separator */

#eoi-form .academic-picker-to {
    padding-bottom: 9px;

    color: #555;

    font-size: 12px;
    font-weight: 600;
}


/* Picker actions */

#eoi-form .academic-picker-actions {
    display: flex;

    justify-content: flex-end;

    gap: 7px;

    margin-top: 12px;
    padding-top: 10px;

    border-top: 1px solid #eee;
}


/* Picker buttons */

#eoi-form .academic-picker-actions button {
    min-width: 70px;

    padding: 7px 13px;

    border: 0;
    border-radius: 4px;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}


/* Apply */

#eoi-form .academic-apply {
    background: #6da52f;
    color: #fff;
}

#eoi-form .academic-apply:hover {
    background: #598b25;
}


/* Cancel */

#eoi-form .academic-cancel {
    background: #e8e8e8;
    color: #333;
}

#eoi-form .academic-cancel:hover {
    background: #d8d8d8;
}


/* =========================================================
   CALENDAR INSTRUCTIONS
   ========================================================= */

#eoi-form .academic-year-instruction {
    margin-bottom: 10px;

    padding: 8px 10px;

    background: #f5f8f1;

    border: 1px solid #dce8d1;
    border-radius: 4px;

    color: #444;

    font-size: 12px;
    line-height: 1.4;
}


#eoi-form .academic-year-instruction .active-step {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 19px;
    height: 19px;

    margin-right: 4px;

    border-radius: 50%;

    background: #6da52f;
    color: #fff;

    font-size: 11px;
    font-weight: 600;
}


#eoi-form .academic-year-instruction .completed-step {
    color: #6da52f;
    font-weight: 700;
}


#eoi-form .academic-year-instruction .inactive-step {
    color: #999;
    font-weight: 600;
}


#eoi-form .academic-year-instruction .instruction-separator {
    margin: 0 7px;

    color: #999;
}


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

#eoi-form input[type="submit"],
#eoi-form button[type="submit"] {
    display: inline-block;

    min-width: 110px !important;
    height: 36px !important;

    padding: 7px 20px !important;

    border: 0 !important;
    border-radius: 4px !important;

    background: #6da52f !important;
    color: #fff !important;

    font-size: 13px !important;
    font-weight: 600 !important;

    line-height: 1 !important;

    cursor: pointer;

    transition: background 0.2s ease;
}


#eoi-form input[type="submit"]:hover,
#eoi-form button[type="submit"]:hover {
    background: #598b25 !important;
}


/* =========================================================
   SUCCESS MESSAGE
   ========================================================= */

.js-success {
    display: block;

    margin: 8px 0 12px;

    padding: 10px 14px;

    background: #008000;
    color: #fff;

    border-radius: 4px;

    font-size: 15px;
    font-weight: 500;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 768px) {

    #eoi-form {
        width: calc(100% - 20px);

        margin: 12px auto 25px;

        padding: 18px 16px;
    }


    #eoi-form .form-item {
        margin-bottom: 16px !important;
    }


    #eoi-form .form-item > label,
    #eoi-form fieldset > legend {
        font-size: 13px !important;
    }


    #eoi-form .academic-year-picker {
        width: 100%;
        max-width: 100%;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

    #eoi-form {
        width: calc(100% - 12px);

        margin: 8px auto 20px;

        padding: 15px 12px;

        border-radius: 4px;
    }


    #eoi-form .form-item {
        margin-bottom: 14px !important;
    }


    #eoi-form .form-item > label,
    #eoi-form fieldset > legend {
        font-size: 12px !important;
    }


    #eoi-form input[type="text"],
    #eoi-form input[type="email"],
    #eoi-form input[type="tel"],
    #eoi-form input[type="url"],
    #eoi-form input[type="number"],
    #eoi-form input[type="month"],
    #eoi-form select {
        height: 36px !important;
        min-height: 36px !important;

        font-size: 12px !important;
    }


    #eoi-form fieldset .form-radios {
        display: block !important;
    }


    #eoi-form fieldset .form-radios .form-type-radio,
    #eoi-form fieldset .form-radios .form-item,
    #eoi-form fieldset .form-radios .js-form-item {
        width: 100% !important;

        margin-bottom: 10px !important;
    }


    #eoi-form fieldset .form-radios label {
        font-size: 12px !important;

        line-height: 17px !important;
    }


    #eoi-form .js-error,
    #eoi-form fieldset .radio-error,
    #eoi-form fieldset .backend-error {
        font-size: 10px !important;

        padding: 5px 7px !important;
    }


    #eoi-form .description {
        font-size: 10px !important;
    }


    /* Academic picker */

    #eoi-form .academic-picker-row {
        flex-direction: column;

        align-items: stretch;

        gap: 7px;
    }


    #eoi-form .academic-picker-to {
        display: none;
    }


    #eoi-form .academic-picker-actions {
        justify-content: stretch;
    }


    #eoi-form .academic-picker-actions button {
        flex: 1;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    #eoi-form {
        padding: 12px 9px;
    }


    #eoi-form fieldset .form-radios .form-type-radio,
    #eoi-form fieldset .form-radios .form-item,
    #eoi-form fieldset .form-radios .js-form-item {
        margin-bottom: 9px !important;
    }


    #eoi-form fieldset .form-radios label {
        font-size: 11px !important;
    }

}

/* =========================================================
   EOI INTRO POPUP
   ========================================================= */

body.eoi-popup-open {
  overflow: hidden !important;
}


/* Popup */

.eoi-intro-popup {
  display: none;

  position: fixed;
  z-index: 999999;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  box-sizing: border-box;
}


/* Dark background */

.eoi-intro-popup-overlay {
  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.65);
}


/* Popup box */

.eoi-intro-popup-box {
  position: relative;
  z-index: 2;

  width: calc(100% - 40px);
  max-width: 850px;

  max-height: calc(100vh - 60px);

  margin: 30px auto;

  background: #ffffff;

  border-radius: 8px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.30);

  overflow: hidden;
}


/* Close button */

.eoi-intro-popup-close {
  position: absolute;

  top: 10px;
  right: 12px;

  z-index: 5;

  width: 36px;
  height: 36px;

  border: 0;
  border-radius: 50%;

  background: #eeeeee;

  color: #333333;

  font-size: 25px;
  line-height: 30px;

  cursor: pointer;
}


.eoi-intro-popup-close:hover {
  background: #dddddd;
}


/* Content */

.eoi-intro-popup-content {
  max-height: calc(100vh - 150px);

  overflow-y: auto;

  padding: 30px 35px 20px;

  box-sizing: border-box;
}


/* Heading */

.eoi-intro-popup-content h2 {
  margin-top: 0;
  padding-right: 40px;

  color: #222222;

  font-size: 24px;
  line-height: 1.35;
}


/* Paragraph */

.eoi-intro-popup-content p {
  line-height: 1.6;
}


/* List */

.eoi-intro-popup-content ul {
  margin-left: 30px;
  padding-left: 15px;
}


/* Bottom action area */

.eoi-intro-popup-actions {
  display: flex;

  justify-content: flex-end;

  padding: 15px 25px;

  border-top: 1px solid #eeeeee;

  background: #fafafa;

  box-sizing: border-box;
}


/* Proceed button */

.eoi-intro-proceed {
  padding: 10px 22px;

  border: 0;
  border-radius: 4px;

  background: #6da52f;

  color: #ffffff;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}


.eoi-intro-proceed:hover {
  background: #598b25;
}


/* Mobile */

@media (max-width: 600px) {

  .eoi-intro-popup-box {
    width: calc(100% - 20px);

    max-height: calc(100vh - 30px);

    margin: 15px auto;
  }

  .eoi-intro-popup-content {
    max-height: calc(100vh - 120px);

    padding: 25px 18px 15px;
  }

  .eoi-intro-popup-content h2 {
    font-size: 19px;
  }

  .eoi-intro-popup-actions {
    padding: 12px 15px;
  }

  .eoi-intro-proceed {
    width: 100%;
  }

}

html,
body {
  overflow-x: hidden !important;
}

.dmeo-eoi-table-wrapper {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  box-sizing: border-box !important;
}

.dmeo-eoi-table-wrapper .dmeo-eoi-admin-table {
  display: table !important;
  width: max-content !important;
  min-width: 1200px !important;
  max-width: none !important;
  margin: 0 !important;
  table-layout: auto !important;
}

.dmeo-eoi-table-wrapper .dmeo-eoi-admin-table th,
.dmeo-eoi-table-wrapper .dmeo-eoi-admin-table td {
  white-space: nowrap !important;
}

#eoi-form > .eoi-intro {
    display: none !important;
}