/* QuickQR-style checkout. Loaded only by restorants/quickqr/checkout.blade.php, after quickqr-menu.css */
:root {
  --qq-co-page: #f8f9fb;
  --qq-co-line: #eceef1;
  --qq-co-radius: 12px;
  --qq-co-control-radius: 8px;
  --qq-co-accent-soft: #fdeeec;
  --qq-navy: #1b2438;
}

body {
  background: var(--qq-co-page);
}

.qq-co-sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.qq-co-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.qq-co-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.qq-co {
  min-height: calc(100vh - 78px);
}

/* Header */
.qq-co-header {
  margin-bottom: 32px;
  padding: 14px 0 34px;
}

.qq-co-header .qq-co-container {
  position: relative;
  z-index: 2;
}

.qq-co .qq-co-header .qq-header-logo {
  flex-basis: 96px;
  height: 96px;
  margin-inline-end: 28px;
  border-radius: var(--qq-co-radius);
  color: var(--qq-accent);
  font-size: 36px;
}

.qq-co-header .qq-header-logo img {
  top: 8px;
  left: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border-radius: 8px;
}

.qq-co .qq-co-header .qq-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 30px;
}

.qq-co-header .qq-slogan {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 26px;
}

.qq-co-header .qq-info {
  margin-bottom: -12px;
  font-size: 15px;
}

.qq-co-header .qq-info li {
  margin-inline-end: 40px;
}

.qq-co-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.qq-co-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--qq-accent);
  border-radius: var(--qq-co-control-radius);
  background: #fff;
  color: var(--qq-accent);
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
}

.qq-co-back:hover {
  background: var(--qq-co-accent-soft);
  color: var(--qq-accent);
}

.qq-co-back .qq-co-icon {
  width: 18px;
  height: 18px;
}

/* Layout */
.qq-co-layout {
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
  align-items: start;
  gap: 30px;
  margin-bottom: 44px;
}

.qq-co-main > form,
.qq-co-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Cards */
.qq-card,
.qq-co-legacy .card.card-profile {
  padding: 20px 30px;
  border: 0;
  border-radius: var(--qq-co-radius);
  background: #fff;
  box-shadow: 0 2px 14px rgba(32, 40, 60, .06);
}

.qq-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--qq-co-line);
  color: var(--qq-accent);
}

.qq-menu .qq-card-head h3,
.qq-menu .qq-co-legacy h3 {
  margin: 0;
  color: var(--qq-heading);
  font-size: 21px;
  font-weight: 600;
  line-height: 28px;
}

.qq-co-count {
  min-width: 34px;
  padding: 2px 10px;
  border-radius: 14px;
  background: var(--qq-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

/* Existing partials rendered inside the new cards */
.qq-co-legacy .card.card-profile > .px-4 {
  padding: 0 !important;
}

.qq-co-legacy .mt-5 {
  margin: 0 0 16px !important;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--qq-co-line);
}

.qq-co-legacy .border-top {
  border: 0 !important;
}

.qq-co-legacy br {
  display: none;
}

.qq-co-legacy {
  display: contents;
}

/* Order items */
#cartList.qq-co-order {
  overflow: visible;
  max-height: none;
}

.qq-co-item {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 0;
  border-bottom: 1px solid var(--qq-co-line);
}

.qq-co-item:first-child {
  padding-top: 0;
}

.qq-co-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.qq-co-thumb {
  position: relative;
  display: flex;
  flex: 0 0 96px;
  align-items: center;
  justify-content: center;
  height: 66px;
  overflow: hidden;
  border-radius: var(--qq-co-control-radius);
  background: var(--qq-section-bg);
  color: #cfcfcf;
  font-size: 22px;
}

.qq-co-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qq-co-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.qq-menu .qq-co-item-info h4 {
  margin: 0;
  color: var(--qq-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
}

.qq-co-item-info p {
  margin: 4px 0 0;
  color: var(--qq-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.qq-co-item-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
}

.qq-co-stepper {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--qq-border);
  border-radius: var(--qq-co-control-radius);
  background: #fff;
}

.qq-co-stepper button,
.qq-co-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
}

.qq-co-stepper button {
  width: 42px;
  height: 100%;
  padding: 0;
  background: transparent;
  color: var(--qq-text);
}

.qq-co-stepper button:hover {
  color: var(--qq-accent);
}

.qq-co-stepper .qq-co-icon {
  width: 16px;
  height: 16px;
}

.qq-co-stepper span {
  min-width: 26px;
  color: var(--qq-heading);
  font-weight: 700;
  text-align: center;
}

.qq-co-remove {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--qq-co-control-radius);
  background: var(--qq-co-accent-soft);
  color: var(--qq-accent);
  transition: background .15s;
}

.qq-co-remove:hover {
  background: #fbdeda;
}

.qq-co-remove .qq-co-icon {
  width: 18px;
  height: 18px;
}

.qq-co-stepper button:focus-visible,
.qq-co-remove:focus-visible,
.qq-co-back:focus-visible,
.qq-co-submit:focus-visible {
  outline: 2px solid var(--qq-accent);
  outline-offset: 2px;
}

/* Empty cart */
.qq-co-empty {
  display: none;
  padding: 12px 0;
  text-align: center;
}

.qq-co-empty p {
  margin: 0 0 16px;
  color: var(--qq-text);
  font-size: 17px;
  font-weight: 400;
}

.qq-co.is-empty .qq-co-empty {
  display: block;
}

.qq-co.is-empty .qq-co-layout {
  grid-template-columns: minmax(0, 1fr);
}

.qq-co.is-empty .qq-co-count,
.qq-co.is-empty #order-form,
.qq-co.is-empty .qq-co-side {
  display: none;
}

/* Radio and checkbox */
.qq-co .custom-control {
  min-height: 28px;
  margin-bottom: 8px;
  padding-inline-start: 34px;
}

.qq-co .custom-control:last-child {
  margin-bottom: 0;
}

.qq-co .custom-control-label {
  color: var(--qq-heading);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
}

.qq-co .custom-control-label::before,
.qq-co .custom-control-label::after {
  top: 1px;
  left: -34px;
  width: 22px;
  height: 22px;
}

.qq-co .custom-control-label::before {
  border: 1px solid #cdd1d7;
  background: #fff;
  box-shadow: none;
}

.qq-co .custom-radio .custom-control-input:checked ~ .custom-control-label::before {
  border: 6px solid var(--qq-accent);
  background: #fff;
}

.qq-co .custom-radio .custom-control-input:checked ~ .custom-control-label::after {
  background-image: none;
}

.qq-co .custom-checkbox .custom-control-label::before {
  border-radius: 5px;
}

.qq-co .custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  border-color: var(--qq-accent);
  background: var(--qq-accent);
}

.qq-co .custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 3px var(--qq-accent-shadow);
}

/* Form fields */
.qq-co .form-group {
  margin: 0;
}

.qq-co textarea.form-control,
.qq-co input.form-control,
.qq-co select.form-control {
  border: 1px solid var(--qq-border);
  border-radius: var(--qq-co-control-radius);
  background: #fff;
  box-shadow: none;
  color: var(--qq-heading);
  font-size: 16px;
}

.qq-co textarea.form-control:focus,
.qq-co input.form-control:focus,
.qq-co select.form-control:focus {
  border-color: rgba(192, 57, 43, .45);
  box-shadow: 0 0 0 3px var(--qq-accent-shadow);
}

.qq-co-table .form-control-label,
.qq-co-table .form-group > br {
  display: none;
}

.qq-co-table-name {
  margin: 0;
  color: var(--qq-heading);
  font-size: 16px;
  font-weight: 600;
}

.qq-co-table .select2-container {
  display: block;
  width: 100% !important;
  height: auto;
  padding: 0;
  border: 0;
}

.qq-co-table .select2-container .select2-selection--single {
  display: flex;
  align-items: center;
  height: 44px;
  padding-inline: 14px 40px;
  border: 1px solid var(--qq-border) !important;
  border-radius: var(--qq-co-control-radius);
  background: #fff;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}

.qq-co-table .select2-container--focus .select2-selection--single,
.qq-co-table .select2-container--open .select2-selection--single {
  border-color: rgba(192, 57, 43, .45) !important;
  box-shadow: 0 0 0 3px var(--qq-accent-shadow);
}

.qq-co-table .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0;
  color: var(--qq-heading) !important;
  font-size: 16px;
  line-height: 42px;
}

.qq-co-table .select2-container .select2-selection--single .select2-selection__arrow {
  top: 0 !important;
  inset-inline: auto 6px;
  height: 100%;
}

.qq-co-restaurant-text {
  margin: 0;
  color: var(--qq-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 27px;
}

.qq-co-restaurant-text strong {
  color: var(--qq-heading);
  font-weight: 600;
}

.qq-co-restaurant-text a {
  color: var(--qq-text);
}

/* Summary column */
.qq-co-side {
  min-width: 0;
  padding: 0;
}

.qq-co-section {
  padding: 20px 24px;
}

.qq-co-summary {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--qq-co-line);
}

.qq-co-payment {
  padding-bottom: 24px;
}

.qq-co-confirm {
  padding-top: 0;
  padding-bottom: 24px;
}

.qq-co-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 16px 14px;
  color: var(--qq-heading);
  font-size: 17px;
  line-height: 26px;
}

.qq-co-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: var(--qq-co-control-radius);
  background: var(--qq-co-accent-soft);
  color: var(--qq-accent);
  font-size: 23px;
  font-weight: 700;
  line-height: 28px;
}

.qq-co-total-empty {
  margin: 0;
  color: var(--qq-text);
  font-size: 16px;
  font-weight: 400;
}

.qq-co-summary .p-4 {
  margin-top: 14px;
  padding: 0 !important;
  background: transparent !important;
}

.qq-co-confirm .custom-control {
  margin-bottom: 22px;
}

.qq-co-confirm .custom-control-label a {
  color: var(--qq-accent);
  text-decoration: underline;
}

.qq-co-submit,
#stripeSend.paymentbutton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: var(--qq-co-control-radius);
  background: var(--qq-accent);
  box-shadow: 0 4px 12px var(--qq-accent-shadow);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: opacity .15s;
}

.qq-co-submit-label {
  text-transform: capitalize;
}

.qq-co-submit:hover:not(:disabled),
#stripeSend.paymentbutton:hover:not(:disabled) {
  opacity: .92;
}

.qq-co-submit:disabled,
#stripeSend.paymentbutton:disabled {
  background: #d9a29c;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.qq-co-submit.is-loading:disabled {
  background: var(--qq-accent);
  cursor: progress;
}

.qq-co-submit.is-loading .qq-co-icon {
  display: none;
}

.qq-co-submit.is-loading::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: qq-co-spin .7s linear infinite;
}

@keyframes qq-co-spin {
  to {
    transform: rotate(360deg);
  }
}

#stripe-payment-form .form-group,
#stripe-payment-form #card-element {
  margin-bottom: 12px;
}

#stripe-payment-form #card-element {
  height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--qq-border);
  border-radius: var(--qq-co-control-radius);
  box-shadow: none;
}

#stripe-payment-form #card-errors {
  color: var(--qq-accent);
  font-size: 14px;
}

#totalSubmitStripe #indicatorStripe {
  display: block;
  margin-bottom: 8px;
  text-align: center;
}

/* Tablet */
@media (max-width: 1100px) {
  .qq-co .qq-header-inner {
    align-items: flex-start;
  }

  .qq-card,
  .qq-co-legacy .card.card-profile {
    padding: 18px 20px;
  }

  .qq-co-side {
    padding: 0;
  }

  .qq-co-section {
    padding: 18px 20px;
  }

  .qq-co-item {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .qq-co-item-info {
    flex-basis: calc(100% - 112px);
  }

  .qq-co-item-controls {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .qq-co-container {
    padding: 0 15px;
  }

  .qq-co-header {
    padding: 16px 0 22px;
    margin-bottom: 18px;
  }

  .qq-co .qq-header-inner {
    position: relative;
  }

  .qq-co .qq-co-header .qq-header-logo {
    width: 84px;
    height: 84px;
    margin: 0 0 12px;
  }

  .qq-co-header-actions {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    max-width: calc(100% - 100px);
  }

  .qq-co-header .qq-info {
    margin-bottom: 0;
  }

  .qq-co-header .qq-info li {
    margin: 0 0 8px;
  }

  .qq-co-layout,
  .qq-co-main,
  .qq-co-main > form,
  .qq-co-side {
    display: contents;
  }

  .qq-co-container > .qq-co-layout {
    display: flex;
  }

  .qq-co-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 30px;
  }

  .qq-co-order { order: 1; }
  .qq-co-summary { order: 2; }
  .qq-co-dine { order: 3; }
  .takeaway_picker .card,
  .qraddressBox .card { order: 4; }
  .qq-co-table { order: 5; }
  .qq-co-phone .card { order: 6; }
  .qq-co-fields .card { order: 7; }
  .qq-co-comment { order: 8; }
  .qq-co-restaurant { order: 9; }
  .qq-co-payment { order: 10; }
  .qq-co-confirm { order: 11; }

  .qq-co-section {
    border: 0;
    border-radius: var(--qq-co-radius);
    background: #fff;
    box-shadow: 0 2px 14px rgba(32, 40, 60, .06);
  }

  .qq-co-summary {
    padding-bottom: 18px;
    border-bottom: 0;
  }

  .qq-co-payment,
  .qq-co-confirm {
    padding: 18px 20px;
  }

  .qq-co.is-empty .qq-co-layout {
    display: flex;
  }

  .qq-menu .qq-card-head h3,
  .qq-menu .qq-co-legacy h3 {
    font-size: 19px;
  }

  .qq-co-thumb {
    flex-basis: 76px;
    height: 58px;
  }

  .qq-co-item-info {
    flex-basis: calc(100% - 92px);
  }

  .qq-menu .qq-co-item-info h4 {
    font-size: 16px;
  }

  .qq-co-total {
    font-size: 20px;
  }
}
