/* Global */
:root {
  --bg-light-gray: #e6e6e6;
  --bg-light-gray2: #f0f0f2;
  --bg-dark-gray: #cccccc;
  --bg-darker-gray: #d1d1d1;

  --text-dark-gray: #262223;
  --text-red: #c12121;
  --text-dark-red: #ac1616;
  --text-medium: 1rem;
  --text-large: 1.4rem;
}

.hidden {
  display: none;
}

.disabled {
  pointer-events: none;
  opacity: .4;
}


body {
  font-family: "Montserrat", sans-serif;
  margin: 0;

  background-color: var(--bg-light-gray);
  color: var(--text-dark-gray);

  font-size: 0.8rem;
  font-weight: 500;

  .med-text {
    font-size: var(--text-medium);
    font-weight: bold;
  }

  .btn {
    padding: 6px 17px;
    border: 1px solid #4a4a4a96;
    border-radius: 5px;
    text-decoration: none;
    transition-duration: 0.1s;

    &:hover {
      cursor: pointer;
    }

    &.primary {
      background-color: var(--text-red);
      color: white;
      border-color: var(--text-dark-red);
    }
    &.success {
    }

    &.btn-sm {
      padding: 4px 9px;
    }
  }

  .response {
    padding: 13px 21px;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    background-color: #efefef;
    border: 1px solid #9c9c9c;
    border-radius: 5px;
    margin-top: 10px;
    &.success {
    }
    &.error {
      border-color: var(--text-dark-red);
      background-color: #df4d4d;
      color: white;
      hr {
        border-color: #df4d4d;
      }
    }
  }

  .input {
    padding: 7px 8px;
    border-radius: 4px;
    border: 1px solid #00000042;
    font-size: 0.9rem;
  }

  .dashboard-outer {
    .header {
      background-color: black;
      padding: 20px 20px;
      display: flex;
      flex-direction: column;
      align-items: center;

      .logo {
        width: 270px;
        max-width: 55%;

        img {
          width: 100%;
          max-width: 100%;
        }
      }

      .title {
        color: white;
        text-align: center;
        font-weight: 700;
        font-size: 1.2rem;
        margin-top: 10px;
        margin-bottom: 5px;
      }
    }

    .disclaimer-top {
      background-color: #ffeabb;
      text-align: center;
      padding: clamp(20px, 2vw, 40px);
      border-radius: 10px;
      border: 1px solid rgba(0, 0, 0, 0.2);

      & > p {
        font-weight: 600;
        font-size: clamp(0.8rem, 1vw, 0.9rem);
        line-height: 140%;
      }

      & > p:first-of-type {
        margin-top: 0;
      }

      & > p:last-of-type {
        margin-bottom: 0;
      }

      .faq-link {
        background-color: transparent;
        border: 0;
        cursor: pointer;
        color: var(--text-red);
        text-decoration: underline;
        font-weight: 700;
        padding: 0;
        font-size: inherit;
        font-family: "Montserrat", sans-serif;
      }
    }

    .card-header {
      background-color: #3d3d3d;
      color: white;
      padding: 18px clamp(20px, 2vw, 40px);
      text-align: center;
      font-size: clamp(0.9rem, 2vw, 1.1rem);
    }

    .faq-modal {
      position: fixed;
      bottom: 0;
      left: 0;
      box-sizing: border-box;
      background-color: rgba(0, 0, 0, 0.4);
      padding: 20px;
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;

      .modal-body {
        position: relative;
        background-color: white;
        max-width: 600px;
        width: 100%;
        max-height: 100%;
        margin: 0 auto;
        border-radius: 5px;
        overflow: hidden;
        display: flex;
        flex-direction: column;

        .card-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          gap: 10px;
        }

        .card-header > h3 {
          margin: 0;
        }

        .faq-header {
          font-size: var(--text-large);
        }
        .faq-close {
          padding: 10px;
        }

        .faq-body {
          padding: 30px clamp(20px, 2vw, 40px);
          overflow: auto;
        }
      }
    }

    .faq-modal.hidden {
      display: none;
    }

    .main-content {
      padding: 30px 20px;
      max-width: 640px;
      margin: auto;

      .order-updates-notice {
        display: inline-flex;
        align-items: center;
        background-color: #ffeabb;
        border: 1px solid #dd6313;
        padding: 1px 20px;
        border-radius: 8px;
        margin-bottom: 7px;
        font-weight: bold;

        .refresh-btn {
          background-color: #bc420b;
          border: none;
          margin-left: 20px;
          border-radius: 3px;
          padding: 10px 19px;
          color: white;
          font-weight: bold;
          display: flex;
          align-items: center;
          justify-content: center;
          .icon {
          }
        }
      }

      .order-details,
      .upload-card {
        box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 5px !important;
      }

      .order-details {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px clamp(20px, 2vw, 40px);
        margin-top: 30px;
        background-color: white;
        /* font-size: var(--text-medium);
                font-weight: bold; */
        /* margin-bottom: 10px; */
      }

      .order-details > .greyPill {
        font-size: clamp(0.9rem, 1vw, 1rem);
      }

      .upload-complete {
        align-items: center;
        text-align: center;
        padding: 15px clamp(20px, 2vw, 40px);
        margin-top: 30px;
        background-color: #d6ffc8;
        box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 5px !important;
        color: #003603;
      }

      .upload-card {
        margin-top: 20px;
        border-radius: 10px;
        overflow: hidden;

        .card-header {
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-content: center;

          .card-header-icon {
            margin-right: 10px;
          }
        }

        .card-body,
        .card-footer {
          background-color: white;
          display: inline-block;
        }

        .card-body {
          background-color: white;
          padding: clamp(30px, 2vw, 40px) clamp(20px, 2vw, 40px);
          width: 100%;
          box-sizing: border-box;

          .card-body-content,
          .upload-outer {
            margin-top: clamp(20px, 2vw, 25px);
          }

          .card-body-content {
            text-align: center;
            font-size: clamp(0.8rem, 1vw, 0.9rem);
            text-wrap: balance;
            line-height: 140%;
          }

          .dvla-reg-outer {
            display: flex;
            justify-content: center;

            .dvla-reg {
              border: 1px solid var(--text-dark-gray);
              font-size: clamp(1.1rem, 1.5vw, 1.4rem);
              padding: 6px 40px;
              border-radius: 7px;
            }
          }

          .upload-outer {
            background-color: #f0f8ff; /* subtle light blue */
            border: 2px dashed #87ceeb; /* sky blue dashed border */
            border-radius: 6px; /* smooth corners */
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px 21px;
            font-size: clamp(0.8rem, 1vw, 0.9rem);
            transition: border-color 0.3s ease, background-color 0.3s ease;
            cursor: pointer;
            text-align: center;
            text-wrap: balance;
            line-height: 140%;

            input {
              /* width: 100%;
                            height: 100%;
                            position: absolute;
                            left: 0;
                            top: 0; */
              visibility: hidden;
            }
          }

          .upload-outer:hover {
            border-color: #1e90ff; /* darker blue on hover */
            background-color: #e6f2ff; /* slightly brighter on hover */
          }
        }

        .card-footer {
          border-top: 1px solid var(--bg-darker-gray);
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-content: center;
          padding: 15px 20px;
          background-color: #b1e4ef;
          font-weight: 700;
          text-align: center;
          text-wrap: balance;
          line-height: 140%;
        }
      }

      .upload-overlay {
        background-color: #0000006b;
        position: fixed;
        width: 100vw;
        height: 100vh;
        left: 0;
        top: 0;
        padding: 42px 20px;
        box-sizing: border-box;
        z-index: 99;
        display: flex;
        justify-content: center;
        align-items: center;

        .overlay-body {
          border-radius: 10px;
          overflow: hidden;
          background-color: white;
          /* width: 100%; */
          text-align: center;
          width: 100%;
          max-width: 600px;
          margin: auto;
          max-height: 100%;
          display: flex;
          flex-direction: column;

          & > .overlay-content {
            padding: 30px 20px;
            overflow: auto;

            & > hr {
              margin: 20px 0;
            }
          }

          .upload-reg-plate {
            font-size: clamp(1.1rem, 1.5vw, 1.4rem);
            padding: 6px 40px;
            border-radius: 7px;

            & > span {
              display: block;
              width: fit-content;
              margin: 0 auto;
            }
          }

          .preview {
            margin-top: 5px;
            img {
              width: auto;
              max-width: 100%;
              max-height: 260px;
            }
          }

          .confirmation {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            margin-top: 18px;

            button {
              width: 48%;
              padding: 14px 10px;
              text-align: center;
              font-weight: bold;
              border-radius: 4px;
              font-size: var(--text-medium);
              border: 1px solid;
              &:hover {
                cursor: pointer;
              }
            }

            &.force {
              flex-wrap: wrap;
              button {
                margin-top: 10px;
                width: 100%;
              }
            }

            &.invalid {
              button {
                width: 100%;
              }
            }
          }
        }
      }

      .upload-overlay.hidden {
        display: none;
      }

      .regNum {
        position: relative;

        button.show-reg-edit {
          position: absolute;
          right: 0;
          top: 0;
          padding: 2px 5px;
          margin: 2px;
          font-size: 10px;
        }

        .reg-number {
          display: inline-block;
          background-color: #ffde0b;
          padding: 10px;
          border-radius: 5px;
          border: 1px solid #3d3d3d;
          font-weight: 600;
          letter-spacing: 1px;
          font-family: Arial, sans-serif;

          &.show-plate {
            border-color: #005aff;
            position: relative;

            &::before {
              content: "Show Plate";
              position: absolute;
              font-size: 9px;
              top: 100%;
              left: 50%;
              transform: translate(-50%, 0);
              width: 90%;
              text-align: center;
              background-color: #005aff;
              color: white;
              padding: 3px 0px;
              border-bottom-right-radius: 4px;
              border-bottom-left-radius: 4px;
            }
          }
          
        }
      }

      .trader-label {
        display: inline-block;
        padding: 2px 12px;
        margin-top: 2px;
        font-size: .7rem;
        background-color: #c7381a;
        border-radius: 3px;
        color: white;
      }
    }
  }

  .floating-msg {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 250px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    text-align: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease, bottom 0.3s ease;
  }
  .floating-msg.success {
    background-color: #28a745;
  }
  .floating-msg.error {
    background-color: #dc3545;
  }
  .floating-msg.show {
    opacity: 1;
    bottom: 40px;
  }

  .modal-outer {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background-color: #19131338;
    display: flex;
    justify-content: center;
    align-items: center;

    .modal-inner {
      position: relative;
      background-color: white;
      padding: 20px 30px;
      border-radius: 8px;
      width: 100%;
      max-width: 600px;
      min-width: 400px;

      .close-modal {
        position: absolute;
        top: 0;
        right: 0;
        padding: 7px;
        margin: 10px;
      }
    }
  }

  button {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
  }
}

body.admin-dashboard {
  .dashboard-outer {
    .order-notes-outer {


      .new-order-note {
        textarea {
          width: 100%;
          margin-bottom: 5px;
        }

        
      }

      .current-order-notes {
        margin-top: 8px;
        max-height: 580px;
        overflow-y: scroll;

        .order-note {
          background-color: #f1f1f1;
          border: 1px solid #cdcdcd;
          padding: 12px 50px 12px 12px;
          border-radius: 7px;
          position: relative;
          margin-bottom: 8px;
          margin-right: 10px;

          .remove-note {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 6px;
          }

          p {
            margin-top: 0;
            margin-bottom: 8px;
          }
        }
      }
    }

    .main-content {
      max-width: 1600px;
      margin: auto;

      &.login {
        max-width: 300px;

        .login-error {
          background-color: #fbd1d1;
          padding: 10px 10px;
          text-align: center;
          margin-bottom: 12px;
          border: 1px solid red;
          border-radius: 6px;
        }

        input {
          width: 100%;
          box-sizing: border-box;
        }

        .btn {
          width: 100%;
          margin-top: 10px;
        }
      }

      .tab-list {
        display: flex;
        align-items: center;

        .tab-btn {
          padding: 10px 32px;
          margin-right: 10px;
          border-top-left-radius: 7px;
          border-top-right-radius: 7px;
          background-color: #bebebe;
          font-weight: 600;
          position: relative;

          &:hover {
            cursor: pointer;
          }

          &.active {
            background-color: white;
          }

          .notification {
            display: inline-block;
            position: absolute;
            right: 0;
            top: 0;
            margin: -3px 2px;
            background-color: red;
            border-radius: 14px;
            padding: 2px 7px;
            color: white;
          }
        }
      }

      .tabs {
        background-color: white;
        padding: 30px;
      }



      .search-outer {
        display: flex;
        align-items: end;
        label {
          margin-bottom: 4px;
          display: block;
        }

        &.hide-filters {
          .hide-on-search {
            opacity: 0.5;
            pointer-events: none;
          }
        }

        .search-value-outer,
        .status-filter-outer {
          margin-left: 10px;
        }

        .verified-filter-outer,
        .complete-filter-outer {
          margin-left: 18px;
        }
        input[type="checkbox"] {
          width: 21px;
          height: 21px;
          margin-top: 11px;
        }
      }

      .identity-table {
        margin-top: 20px;

        th {
          &.order-column {
            position: relative;
            &:hover {
              cursor: pointer;
            }
          }
        }

        &[order-dir="DESC"] th.current-order::after {
          content: "";
          position: absolute;
          top: 2px;
          right: 2px;
          /* transform: translateX(-50%); */
          width: 0;
          height: 0;
          border-left: 6px solid transparent;
          border-right: 6px solid transparent;
          border-top: 7px solid black;
        }

        &[order-dir="ASC"] th.current-order::after {
          content: "";
          position: absolute;
          top: 2px;
          right: 2px;
          /* transform: translateX(-50%);  */
          width: 0;
          height: 0;
          border-left: 6px solid transparent;
          border-right: 6px solid transparent;
          border-bottom: 7px solid black;
        }

        tr {
          position: relative;

          &.highlighted-reg {
            td.reg-column {
              border: 3px solid #f08d18 !important;
            }
          }

          td {
            &.status-column {
              position: relative;

              &[status="2"] {
                background-color: rgba(13, 128, 0, 0.387);
              }

              &[status="3"],
              &[status="5"] {
                background-color: rgba(255, 0, 0, 0.315);
              }

              &[status="4"] {
                background-color: rgba(255, 123, 0, 0.392);
              }

              .score-reason-outer {
                position: absolute;
                left: 0;
                top: 100%;
                background-color: white;
                padding: 8px 20px;
                min-width: 580px;
                z-index: 9;
                border: 1px solid rgba(0, 0, 0, 0.6);
                box-shadow: 1px 2px 15px rgba(0, 0, 0, 0.5);
                border-radius: 5px;

                &.reverse {
                  left: unset;
                  right: 0;
                }
              }
            }
          }
        }

        .copy-dash-link {
        }
      }

      .dispatch-order-count {
        background-color: grey;
        font-weight: bold;
        padding: 10px 13px;
        border-radius: 33px;
        margin-right: 6px;
        display: inline-block;
        color: white;
        margin-bottom: 8px;
        &.red {
          background-color: rgb(242, 0, 0);
        }
      }

      .trader-email-tab {
        .new-email-outer {
          margin-bottom: 10px;
        }

        .trader-email-table {
          td {
            padding: 7px 15px;
          }
        }
      }
    }
  }
}

/* Page Loader */
.has-page-loader {
  position: relative;
}

.page-loader {
  background-color: #000000cc;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;

  .inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .page-load-msg {
      color: white;
      font-size: 1.2rem;
      text-align: center;
      width: 100%;
      padding: 30px;
      box-sizing: border-box;
      text-shadow: 1px 1px 2px #000000;
    }
  }
}

.page-loader.light {
  background-color: #ffffff9e;
}

.page-loader .lds-spinner {
  color: official;
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.page-loader .lds-spinner div {
  transform-origin: 40px 40px;
  animation: lds-spinner 1.2s linear infinite;
}

.page-loader .lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3px;
  left: 37px;
  width: 6px;
  height: 18px;
  border-radius: 20%;
  background: #fff;
}

.page-loader.light .lds-spinner div:after {
  background: #000;
}

.page-loader .lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}

.page-loader .lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}

.page-loader .lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}

.page-loader .lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}

.page-loader .lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}

.page-loader .lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}

.page-loader .lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}

.page-loader .lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}

.page-loader .lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}

.page-loader .lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}

.page-loader .lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}

.page-loader .lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}

@keyframes lds-spinner {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.greyPill {
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 5px;
  background-color: #f8f8f8;
}

.orderName {
  display: flex;
  align-items: center;
  gap: 10px;
}

.documentPill > :nth-child(1) {
  font-weight: 600;
}

.documentPill > :nth-child(2) {
  margin-top: 2px;
}

.twoBtns {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  width: 100%;
}

.status-column > .status {
  font-weight: 600;
  background-color: white;
  padding: 5px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  text-align: center;
}

.greenTick {
  margin-bottom: 0;
}

.greenTick > i {
  color: #198754;
  font-size: clamp(1.8rem, 4vw, 2rem);
}

.card-body .greenTick > i {
  font-size: clamp(3.8rem, 5vw, 4rem);
}

.blueOutlineBtn,
.redOutlineBtn,
.greenOutlineBtn,
.greyOutlineBtn {
  background-color: transparent;
}

.blueOutlineBtn {
  border-color: #0d6efd !important;
  color: #0d6efd;

  &.solid {
    background-color: #0d6efd;
    color: white;
  }
}



.blueOutlineBtn:hover {
  background-color: #0d6efd;
  color: white;
}

.redOutlineBtn {
  border-color: #dc3545 !important;
  color: #dc3545;
}

.redOutlineBtn:hover {
  background-color: #dc3545;
  color: white;
}

.greenOutlineBtn {
  border-color: #198754 !important;
  color: #198754;
}

.greenOutlineBtn:hover {
  background-color: #198754;
  color: white;
}

.greyOutlineBtn {
  border-color: #6c757d !important;
  color: #6c757d;
}

.greyOutlineBtn:hover {
  background-color: #6c757d;
  color: white;
}

.blueSolidBtn {
  background-color: #0d6efd;
  border-color: #0d6efd !important;
  color: white;
}

.blueSolidBtn:hover {
  background-color: #0b5ed7;
}

.greenSolidBtn {
  background-color: #198754;
  border-color: #198754 !important;
  color: white;
}

.greenSolidBtn:hover {
  background-color: #157347;
}

.greySolidBtn {
  background-color: #6c757d;
  border-color: #6c757d !important;
  color: white;
}

.greySolidBtn:hover {
  background-color: #5c636a;
}

/* ==========
    Accordion
=============*/

.accordion {
  border: 1px solid #ddd;
  border-radius: 6px;
  max-width: 100%;
  overflow: hidden;
}

.accordion-header {
  display: block;
  width: 100%;
  padding: 1rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  transition: background 0.1s;
}

.accordion-header:hover {
  background: #e9ecef;
}

/* Active header gets a new color */
.accordion-item.active .accordion-header {
  background: #3d3d3d;
  color: #fff;
}

.accordion-content {
  display: none;
  padding: 1rem;
}

.accordion-item.active .accordion-content {
  display: block;
}

.accordion > .accordion-item:not(:last-of-type) .accordion-content,
.accordion > .accordion-item:not(:last-of-type) .accordion-header {
  border-bottom: 1px solid #ddd;
}
