:root {
    --c1: #fff;
    --c2: #FBFBFB;
    --c3: #0a0a0a;
    --c4: #E6E9ED;
    --c5: #2471ff;
    --c6: #184cac;
    --c7: #378C3A;
    --c8: hsla(219, 100%, 67%, 0.5);
    --c9: rgba(91, 0, 0, 0.85);
    --c10: #444444;
    --c11: #eeeeee;
    --c12: #dddddd;
    --r1: .25rem;
    --r2: .5rem;
    --r3: 1rem;
    --ff: "Geist", serif;
}

*, *::before, *::after{
    box-sizing: border-box;
    margin: 0; 
    padding: 0; 
}

ul[role='list'], ol[role='list']{
    list-style: none; 
}

html:focus-within{
    scroll-behavior: smooth; 
}

a {
    color: var(--c3);
}

a:hover, a:focus-visible {
    color: var(--c5);
}

a:not([class]){
    text-decoration-skip-ink: auto; 
}

img, picture, svg, video, canvas{
    max-width: 100%;
    height: auto; 
    vertical-align: middle; 
    font-style: italic; 
    background-repeat: no-repeat; 
    background-size: cover;
}

input, button, textarea, select{
    font: inherit;
}

label {
    font-weight: 500;
}

@media (prefers-reduced-motion: reduce){
    html:focus-within {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
        transition: none;
    }
}

html{
    scroll-behavior: smooth; 
}

body {
    background-color: var(--c2);
    font-family: var(--ff);
    min-height: 100vh;
    padding: 0 .5rem;
}

#app {
    background-color: var(--c1);
    border: 1px solid var(--c4);
    border-radius: var(--r2);
    max-width: 1400px;
    margin: 1rem auto;
    padding: 1rem;
}

.container2 {
    max-width: 1400px;
    margin: .5rem auto;
}

#app[data-app="admin"], .container2[data-type="admin"] {
    max-width: calc(100% - 1rem);
}

.abm-banner {
    border-top-left-radius: var(--r2);
    border-top-right-radius: var(--r2);
    max-width: 100%; 
    object-fit: contain; 
    user-select: none;
    pointer-events: none;
}

.nav {
    background-color: var(--c1);
    border: 1px solid var(--c4);
    border-radius: var(--r2);
    width: fit-content;
}


.nav, .nav > ul, .nav > ul > li {
    display: flex;
}

.nav > ul {
    align-items: center;
    width: 100%;
}

.nav li {
    align-items: center;
}

.nav li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: .25rem 1rem;
    gap: .25rem;
}

.nav a svg {
    width: 1.3rem;
    height: 1.3rem;
}

.item-login {
    margin-left: auto;
}

.item-home a {
    border-right: 2px solid var(--c1);
}

.main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.main[data-main="single-col"] {
    grid-template-columns: 1fr;
    margin-top: 0;
}

.book-details {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 1rem;
    height: fit-content;
}

.order-form-section:after {
    content: "";
    background-color: var(--c4);
    height: 100%;
    width: 2px;
    position: absolute;
    top: 0;
    left: -2rem;  
    pointer-events: none;
}

.book-cover {
    max-width: 600px;
    margin: 0 auto;
}

.book-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1rem 1rem 1rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--c5);
    color: white;
    text-decoration: none;
    border-radius: 50vh;
    text-align: center;
}

.btn:hover {
    background-color: var(--c6);
}

.order-form-section {
   position: relative;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-form-details {
    display: flex;
    flex-direction: column;
}

.order-form-details label {
    margin-bottom: .25rem;
}

.order-form__unique {
    display: flex;
    flex: 1;
    gap: 1rem;
}

.order-form__unique input {
    flex: 1;
}

.order-form-group {
    display: flex;
    gap: 2rem;
}

.order-form-group > * {
    flex: 1;
}

.order-form input, .order-form select, .textarea-notes {
    background-color: var(--c11);
    padding: 0.5rem;
    border: 1px solid var(--c12);
    border-radius: var(--r2);
    outline: 0;
    transition: border-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
}

.order-form input:focus, .order-form select:focus, .textarea-notes:focus {
    border: 1px solid var(--c5);
    box-shadow: 0 0 0 .2rem var(--c8);
}

.order-form button, .btn-login, .toggle-form-vis {
    background-color: var(--c5);
    color: var(--c1);
    padding: .75rem 1rem;
    border: 0 transparent;
    border-radius: 50vh;
    cursor: pointer;
}

.order-form button:hover, .btn-login:hover, .toggle-form-vis:hover {
    background-color: var(--c6);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid var(--c2);
    border-radius: var(--r2);
    background-color: var(--c2);
}

.login-form label {
    display: block;
    margin-bottom: .25rem;
}

.login-form input {
    padding: 0.5rem;
    border: 1px solid var(--c4);
    border-radius: var(--r2);
    outline: 0;
    transition: border-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
}

.login-form input:focus {
    border: 1px solid var(--c5);
    box-shadow: 0 0 0 .2rem var(--c8);
}

.error {
    color: rgb(189, 1, 1);
    margin-top: 1rem;
    text-align: center;
}

#copycode {
    position: absolute;
    top: -4rem;
    right: 0;
    display: none;
    padding: .5rem;
    background-color: var(--c7);
    color: var(--c1);
    border-radius: var(--r2);
    z-index: 2;
}

button.btn-copy, button.toggle-form-vis {
    background-color: var(--c10);
    font-size: .9rem;
    padding: .25rem .75rem;
}

button.btn-copy:hover, button.toggle-form-vis:hover {
    background-color: var(--c3);
}

.btn-copy > svg {
    width: 1.25rem;
    height: 1.25rem;
}


button.regenerate-uniquecode {
    background-color: #ac7900;
    font-size: .9rem;
    padding: .25rem .75rem;
}

button.regenerate-uniquecode:hover {
    background-color: #825b00;
}

.regenerate-uniquecode > svg {
    width: 1.25rem;
    height: 1.25rem;
}


input.readonly-input {
    background-color: #d4d4d4;
    outline: 0;
    cursor: not-allowed;
}

.payment-info-box {
    background-color: rgba(0, 0, 0, 0.87);
    color: var(--c1);
    padding: .5rem;
    border-radius: var(--r1);
}

.payment-info-box p:not(:last-child) {
    margin-bottom: .75rem;
}

.textarea-notes {
    min-height: 100px;
}

.instructions {
    margin-top: 2rem;
}

.instructions ol {
    list-style: decimal;
    list-style-position: inside;
    margin: 1rem 0;
    padding: 1rem;
    padding-left: 0;
}

.instructions ol li {
    margin-bottom: .5rem;
}

.order-status-message {
    text-align: center;
    padding: 2rem;
}

.order-status-message h1 {
    margin-bottom: 1rem;
}

.btn-mark {
    background-color: var(--c5);
    border-radius: var(--r2);
    border: 1px solid transparent;
    color: var(--c1);
    cursor: pointer;
    font-size: .85rem;
    padding: .5rem;
}

.btn-mark:hover {
    background-color: var(--c6);
}

.btn-delete {
    background-color: rgb(255, 40, 40);
    border-radius: var(--r2);
    border: 1px solid transparent;
    color: var(--c1);
    cursor: pointer;
    font-size: .85rem;
    padding: .5rem;
}

.btn-delete:hover {
    background-color: rgb(199, 33, 33);
}

table {
    border: 1px solid #bbb;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    width: 100%;
    margin-top: 1rem;
  }
  
  table tr {
    background-color: var(--c2);
    border: 1px solid #bbb;
    padding: .35em;
  }

  table tr:hover {
    background-color: var(--c4);
  }
  
  table th,
  table td {
    font-size: .85rem;
    padding: .625em;
    text-align: center;
    border: 1px solid #bbb;
  }
  
  table th {
    background-color: var(--c4);
    color: var(--c6);
    font-size: .85em;
    text-transform: uppercase;
  }

  [data-label="Status"] {
    text-transform: uppercase;
  }

  .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    z-index: 1000;
    animation: fadeInOut 3s;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-20px); }
}
  
  @media screen and (max-width: 980px) {
    table {
      border: 0;
    }
    
    table thead {
      border: none;
      clip: rect(0 0 0 0);
      height: 1px;
      margin: -1px;
      overflow: hidden;
      padding: 0;
      position: absolute;
      width: 1px;
    }
    
    table tr {
      display: block;
      margin-bottom: .625em;
      padding: 0;
    }
    
    table td {
      border-bottom: 1px solid #bbb;
      display: flex;
      flex-direction: column;
      font-size: .8em;
      text-align: left;
    }
    
    table td::before {
      content: attr(data-label);
      float: left;
      font-weight: bold;
      text-transform: uppercase;
      color: var(--c6);
    }
  }
  
.filter-orders {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 1rem 0;
}

.filter-links {
    display: flex;
    margin-left: 1rem;
    gap: .5rem;
}

  .filter-links a {
    border: 1px solid var(--c4);
    background-color: var(--c4);
    border-radius: var(--r1);
    text-decoration: none;
    padding: .25rem .5rem;
    user-select: none;
}
.filter-links a.active {
    background-color: var(--c5);
    border: 1px solid var(--c5);
    color: var(--c1);
}

.admin-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-orders-counters {
    display: flex;
    flex-wrap: wrap;
}

.admin-orders-counters > span:nth-child(2):before {
    content: " | ";
    margin-left: 4px;
}

.admin-orders-counters > span:nth-child(2):after {
    content: " | ";
    margin-right: 4px;
}

.label-group {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.required-label {
    color: rgb(180, 0, 0);
    font-weight: 500;
    text-transform: uppercase;
    cursor: default;
    user-select: none;
}

.order-status-message p + p {
    margin-top: .5rem;
}

.order-form-price {
    font-size: 1.2rem;
    text-decoration: underline;
}

.book-desc {
    margin: .5rem 0;
}

.order-form2 {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.order-form-col-group {
    display: flex;
    gap: 1rem;
}

.order-form-expanded {
    flex: 1;
}

.b-title-field {
    flex: 1;
}

.order-form-input-fitcontent button {
    width: fit-content;
    line-height: 1;
}

#bookdetails-update {
    display: none;
}

.admin-title-flexgroup {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.order-form-col-group [data-payment-method-box] {
    flex: 1;
}

.spacer {
    background-color: var(--c10);
    height: 2px;
    margin: .5rem 0;
}

#payments-update {
    display: none;
}

#time-remaining {
    font-weight: 500;
    transition: transform 0.2s ease-in-out;
}

#time-remaining.animate {
    transform: scale(1.2);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0;
    justify-content: center;
}
.pagination a {
    font-size: .9rem;
    padding: .35rem .75rem;
    text-decoration: none;
    color: var(--c5);
    border: 1px solid var(--c12);
    border-radius: .25rem;
    display: inline-block;
}
.pagination a.active {
    background-color: var(--c6);
    color: var(--c1);
    border-color: var(--c6);
}
.pagination a:hover {
    background-color: var(--c5);
    color: var(--c1);
    border-color: var(--c5);
}

.payment-alternate {
    background-color: var(--c4);
    width: 100%;
    height: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-alternate:before {
    content: "or scan qr code and pay";
    text-transform: uppercase;
    font-size: 1.15rem;
    font-weight: 500;
    background-color: var(--c2);
    padding: .25rem .5rem;
}

.payment-alternate-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.payment-alternate-qr img {
    max-width: 550px;
}

.book-instructions {
    margin-bottom: 1rem;
    border: 3px dashed red;
    padding: .5rem;
}

#bookdetails-instructions {
    display: none;
}

.container-checkmark {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.container-checkmark input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #808080;
}

.container-checkmark input:checked ~ .checkmark {
  background-color: var(--c5);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.container-checkmark input:checked ~ .checkmark:after {
  display: block;
}

.container-checkmark .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

.order-form-paymentcheck {
    border: 2px dashed red;
    padding: .5rem;
}

.order-form .button-ordersubmit-disabled {
    background-color: #535353;
  pointer-events: none;
  opacity: 0.6;
  cursor: not-allowed;
}

.payment-buttons-paypal {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.payment-buttons-paypal > a {
    background-color: #6e0053;
    padding: .75rem;
    text-decoration: none;
    border-radius: .25rem;
    color: white;
    text-align: center;
    position: relative;
    user-select: none;
}

.payment-buttons-paypal > a:active {
    top: 1px;
}

.payment-buttons-paypal > a:hover {
    box-shadow: 0 0 .75rem .5rem hsla(315, 100%, 22%, 0.33);
}

.payment-buttons-paypal > a:nth-child(2) {
    background-color: #725700;
}

.payment-buttons-paypal > a:nth-child(2):hover {
    box-shadow: 0 0 .75rem .5rem hsla(46, 100%, 22%, 0.33);
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(190, 0, 0, 0.747);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 96, 90, 0.349);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

.attention-highlight {
  animation: pulse-border 1.4s infinite;
  border-radius: 4px;
}

@media screen and (max-width: 1500px) {
    .admin-orders {
        width: 100%;
        overflow: hidden;
    }

    .orders-table {
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media screen and (max-width: 980px) {
    .main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .book-details {
        position: static;
    }

    .order-form-section::after {
        left: 0;
        top: -2rem;
        width: 100%;
        height: 2px;
    }

    .admin-orders {
        width: 100%;
        overflow: auto;
    }
}

@media screen and (max-width: 700px) {
    #app {
        padding: .5rem;
        margin: .5rem auto;
        width: 100%;
    }

    #app[data-app="admin"], .container2[data-type="admin"] {
        max-width: 100%;
    }

    .order-form-group {
        flex-direction: column;
    }

    .order-form-group {
        gap: 1rem;
    }

    .order-form__unique {
        flex-direction: column;
    }

    h1, h2 {
        font-size: 1.2rem;
    }

    .book-info p {
        text-align: center;
    }

    .order-status-message {
        padding: .5rem;
    }

    .login-form {
        max-width: 100%;
        margin: .5rem 0;
        padding: .5rem 0;
    }

    .book-cover {
        max-width: 100%;
    }

    .order-form-col-group {
        flex-direction: column;
    }

    .order-form-input-fitcontent button { 
        width: 100%;
    }

    .payment-alternate-qr img {
        max-width: 100%;
    }
}