/**
 * @file
 * Quick Order form (the "Quick Order Anywhere" custom block) and the pop-up
 * cart it fills.
 *
 * Moved from the "Quick Order" Asset Injector stylesheet. These rules load
 * after the theme, as the injector's did: see quickbolt_commerce_css_alter().
 */

.view-popup-cart-block .view-content {
  justify-content: space-around;
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #ccc;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#block-quickscrews-quickorderanywhereblock {
  display: grid;
}

.quickorderdetails summary {
  font-size: 16px;
}

.quickorderdetails {
  border-radius: 7.5px;
  background-color: white;
  border: 1.25px solid #54bcd7;
}

.quickorderdetails:not([open]):hover {
  cursor: pointer;
  background-color: #e7f1f3;
}

#checkoutForm {
  max-width: 1440px;
  margin: 10px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  place-self: center;
  width: 98%;
}

.temp-cart #edit-actions {
  display: none;
}

#productContainer {
  display: grid;
  gap: 10px;
}

#checkoutForm .product {
  display: flex;
  flex-direction: row;
  text-align: center;
  align-items: center;
  margin-bottom: 10px;
}

#checkoutForm label {
  font-weight: bold;
  flex: 20%;
}

#checkoutForm input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  flex: 20%;
}

#checkoutForm button {
  background-color: #5b6773;
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.3s;
  flex: 20%;
  margin-left: 15%;
}

#checkoutForm button:hover {
  background-color: #54bcd7;
}

#checkoutForm .removeProduct {
  background-color: #5b6773;
  padding: 8px;
  font-size: 14px;
}

#checkoutForm .removeProduct:hover {
  background-color: #54bcd7;
}

#checkoutForm .button-row {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 15px;
}

@media (max-width: 600px) {
  #checkoutForm .product {
    flex-direction: column;
  }

  #checkoutForm .removeProduct {
    width: 100%;
    margin-top: 5px;
  }

  #checkoutForm .button-row {
    flex-direction: column;
  }

  #checkoutForm button {
    width: 100%;
    margin: 40px 0px 10px 0px;
  }
}
