/*

These styles fix/override things after adding bootstrap in Jan 2026

*/

:root {
  --bs-body-font-size: 14px;
  --bs-font-sans-serif: 'Cabin', sans-serif;
  --color-red: #C53C44;

  --color-grey: #888888;
  --color-grey-light: #BCBEC0;
  --color-red: #E33C29;
  --color-teal: #00A9A1;
  --color-teal-dark: #007B7A;
  --color-cream: #F1EADB;

  --bs-body-color: black;
  
}



h1,h2,h3,h4,h5,h6,p,form { margin: 0px; padding: 0px; }
h1,h2,h3{ margin-bottom: 15px; }
h2,h3 { margin:10px 0 20px 0; }

h2 { font-size: 21px; font-weight: 400; }
h3 { font-weight:700; color: var(--color-red); margin: 0 0 22px 0; }
h4 { font-weight: 700; }
h1 { font-size: 22px; color: var(--color-red); font-weight: 400; border-bottom: 2px solid var(--color-red); padding-bottom: 10px; }
h4 { margin-bottom: 5px; font-size: 15px; }


.breadcrumb {
  gap: 10px;
}


.featherlight {
  background: rgba(0, 0, 0, .8) !important;
}

a { 
  text-decoration: none;
  color: var(--color-red);
}

p {
  margin-bottom: 18px;
}

table {
  border-collapse: unset;
}

#nav-primary {
  display: flex;

  > li {
    float: none;
    display: flex;

    > a {

      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;      

    }

  }

}

#footer-bottom {

  height: auto;

  #footer-content {
    margin-top: 0;
    padding-top: 20px;
    padding-bottom: 20px;
  }

}














section.form {

  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;

  .logo {
    img {
      width: 350px;
      max-width: 100%;
      padding-bottom: 32px;
      margin: 0 auto;
      display: block;
    }
  }

  .intro {
    > *:last-child {
      margin-bottom: 0;
    }
  }

  .elements {

    display: flex;
    flex-direction: column;
    gap: 32px;

    h3 {
      margin-bottom: 0;
    }

    .element {

      position: relative;

      * { 
        position: relative;
        z-index: 1; 
      }

      .form-label {
        display: block;
        font-weight: 700;
        font-size: 14px;
      }

      .form-control {
        /* width: 100%;
        box-sizing: border-box;
        font-size: 14px;
        padding: 8px 12px; */
        border: 1px solid var(--color-grey-light);
        border-radius: 4px;
      }

      &.date {
        input {
          display: inline-block;
          width: auto;
        }
      }
      &.sectionopen {
        @media (min-width: 768px) {
          .row .element {
            flex: 1 0 0%;
          }
        }
      }
      
      &.signature {
        button {
          background-color: var(--color-green);
          border-color: var(--color-green-dark);
          min-width: 80px;
          color: #fff;
          font-size: 14px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          height: 2em;
          border-radius: 4px;
          border: 1px solid;
          float: right;
        }
        button:hover {
          background-color: #01502b;
          border-color: #01502b;
        }
      }

      &.icon-boxes {

        .icon-box-options {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
          gap: 16px;
        }

        .icon-box-option {
          position: relative;
          border: 1px solid var(--color-grey-light);
          border-radius: 4px; 
          padding: 16px;
          
          font-weight: 700;
          background: white;
          
          display: flex;
          flex-direction: column;
          justify-content: center;
          aspect-ratio: 197/160;

          label {
            display: flex;
            gap: 16px;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
          }


          input {
            position: absolute;
            float: none;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            margin: 0;
            opacity: 0;
          }

          &:has(input:checked) {
            background: var(--color-red);
            color: white;
            border-color: var(--color-red);
          }

        }

      }

    }

    
    .element:has(input:focus):before,
    .element:has(textarea:focus):before {
      position: absolute;
      content: '';
      width: calc(100% + 32px);
      height: calc(100% + 32px);
      /*background: #f1f5ff;*/
      z-index: 0;
      left: -16px;
      top: -16px;
    }
    /* adjust for elements within a section (nested) */
    .sectionopen .element:has(input:focus):before,
    .sectionopen .element:has(textarea:focus):before {
      width: calc(100% + 8px);
      left: -8px;
    }

    .element {
      /* remove focus background from sub-elements */
      .element:has(input:focus):before {
        display: none;
      }
    }


    /*
    .element.element-error:before {
      position: absolute;
      content: '';
      width: calc(100% + 32px);
      height: calc(100% + 32px);
      background: #f8d7da !important;
      border-bottom: 2px solid white;
      z-index: 0;
      left: -16px;
      top: -16px;
    }   
    */

    .form-control.error {
      border-color: var(--color-red);
      &:focus {
        box-shadow: 0 0 0 .25rem rgba(180, 80, 120, 0.25);
      }
    }

    @media (max-width: 767px) {



      /* adjust for elements within a section (nested) */
      .sectionopen .element.element-error:before {
        width: calc(100% + 16px);
        left: -8px;
        height: calc(100% + 16px);
        top: -5px;
      }

      /* adjust for first field within a section */
      .sectionopen .element.element-error:nth-child(1):before {
        width: calc(100% + 16px);
        left: -8px;
        height: calc(100% + 28px);
        top: -16px;
      }
      /* adjust for second field within a section */
      .sectionopen .element.element-error:nth-child(2):before {
        width: calc(100% + 16px);
        left: -8px;
        height: calc(100% + 24px);
        top: -5px;
      }

    }
    @media (min-width: 768px) {

      /* adjust for elements within a section (nested) */
      .sectionopen .element.element-error:before {
        width: calc(100% + 8px);
        left: -8px;
      }

      /* adjust for second field within a section */
      .sectionopen .element.element-error:nth-child(2):before {
        width: calc(100% + 8px);
        left: 0;
      }
      
    }

  }


  .form-check input,
  .form-check label {
    cursor: pointer;
  }

  em.req {
    color: red;
    font-weight: 500;
  }

  hr { 
    margin: 0;
  }

  /*
  input[type=submit] {
    background-color: var(--color-green);
    border-color: var(--color-green-dark);
    min-width: 180px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3em;
    border-radius: 4px;
    border: 1px solid;
    transition: all 0.2s ease;
  }
  input[type=submit]:hover {
    background-color: black;
    border-color: black;
  }
  */

  progress {
    width: 100%;
    height: 5px;
    border: none; /* Remove default border */
    background-color: #e0e0e0; /* Background for the progress bar */
    border-radius: 10px;
    overflow: hidden; /* Ensures rounded corners apply */
  }

  /* Style the value (the filled portion of the progress bar) */
  progress::-webkit-progress-value {
      background-color: var(--color-red); 
      transition: width 0.2s; /* Smooth animation */
  }

  progress::-moz-progress-bar {
      background-color: var(--color-red); 
      transition: width 0.2s;
  }

  /* Style the remaining part of the bar */
  progress::-webkit-progress-bar {
      background-color: #e0e0e0; /* Light gray */
  }

}


