/* AF ShopBook V31.24 — Compact mobile payment checkout
   Presentation-only. Payment validation and submission behavior are unchanged. */

.checkout-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.optional-payment-note {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
  overflow: hidden;
}

.optional-payment-note summary {
  min-height: 44px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: .74rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.optional-payment-note summary::-webkit-details-marker {
  display: none;
}

.optional-payment-note summary::after {
  content: "+";
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  color: var(--orange);
  font-size: 1rem;
  line-height: 1;
}

.optional-payment-note[open] summary::after {
  content: "−";
}

.optional-payment-note .renewal-textarea {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
}

@media (max-width: 620px) {
  .renewal-dialog-v2 {
    height: 96dvh;
    max-height: 96dvh;
    border-radius: 20px 20px 0 0;
  }

  .renewal-dialog-v2 .renewal-dialog-header {
    padding: 12px 14px 11px;
    gap: 10px;
  }

  .renewal-dialog-header span {
    font-size: .61rem;
  }

  .renewal-dialog-header h2 {
    margin: 2px 0 3px;
    font-size: 1.18rem;
    line-height: 1.3;
  }

  .renewal-dialog-header p {
    max-width: 290px;
    font-size: .65rem;
    line-height: 1.5;
  }

  .dialog-close {
    width: 39px;
    height: 39px;
    min-width: 39px;
    border-radius: 11px;
  }

  .renewal-dialog-v2 #renewalForm {
    gap: 8px;
    padding: 9px 10px 0;
    scroll-padding-block: 10px 84px;
  }

  .renewal-step {
    gap: 7px;
    padding: 10px;
    border-radius: 13px;
  }

  .step-heading {
    gap: 8px;
  }

  .step-heading > span {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    font-size: .72rem;
  }

  .step-heading b {
    font-size: .76rem;
  }

  .step-heading small {
    display: none;
  }

  /* Three plans at a glance, without three tall blocks. */
  .plan-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  .plan-choice {
    min-height: 82px;
    padding: 8px 6px;
    gap: 3px;
    border-radius: 11px;
    text-align: center;
    align-content: center;
  }

  .plan-choice-head {
    display: block;
  }

  .plan-choice-head b {
    display: block;
    font-size: .69rem;
    line-height: 1.35;
  }

  .plan-choice-head small {
    display: none;
  }

  .plan-choice strong {
    font-size: .76rem;
    line-height: 1.25;
  }

  .plan-choice > small {
    font-size: .55rem;
    line-height: 1.3;
  }

  .plan-choice.selected {
    box-shadow: 0 0 0 2px var(--teal-soft);
  }

  /* The cards already show plan and price, so remove the duplicate summary. */
  .renewal-summary {
    display: none;
  }

  .renewal-payment-step label[for="currencySelect"] {
    display: none;
  }

  .renewal-select {
    min-height: 42px;
    padding-block: 0;
    border-radius: 11px;
    font-size: .72rem;
  }

  .payment-method-fieldset {
    gap: 7px;
  }

  .payment-method-fieldset legend {
    font-size: .67rem;
  }

  .payment-method-grid-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .payment-method-option {
    min-height: 60px;
    padding: 7px 8px;
    gap: 7px;
    border-radius: 11px;
  }

  .payment-method-logo {
    width: 45px;
    min-width: 45px;
    height: 39px;
    padding: 4px;
    border-radius: 9px;
  }

  .payment-method-option b {
    font-size: .67rem;
    line-height: 1.35;
  }

  .payment-method-option small {
    font-size: .54rem;
  }

  /* One compact transfer card instead of a second large section. */
  .payment-destination {
    gap: 7px;
    padding: 10px;
    border-radius: 13px;
  }

  .destination-brand {
    gap: 8px;
  }

  .destination-logo {
    flex-basis: 48px;
    width: 48px;
    height: 40px;
    padding: 4px;
    border-radius: 9px;
  }

  .destination-brand b {
    font-size: .76rem;
  }

  .destination-brand small {
    font-size: .56rem;
  }

  .payment-instructions {
    padding: 8px 9px;
    font-size: .61rem;
    line-height: 1.55;
    border-radius: 10px;
  }

  .destination-data {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .destination-data > div {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 8px 9px;
    border-radius: 10px;
  }

  .destination-data span {
    font-size: .54rem;
  }

  .destination-data b {
    font-size: .67rem;
    line-height: 1.45;
  }

  .copy-value-btn {
    min-height: 29px;
    padding-inline: 8px;
    font-size: .58rem;
  }

  .destination-actions {
    gap: 6px;
  }

  .payment-link-btn,
  .qr-toggle-btn {
    min-height: 34px;
    padding-inline: 10px;
    border-radius: 9px;
    font-size: .62rem;
  }

  .payment-qr-wrap {
    padding: 8px;
  }

  .payment-qr-wrap img {
    max-height: 270px;
  }

  /* Sender and proof are the only remaining actions. */
  .renewal-sender-step,
  .renewal-proof-step {
    padding: 10px;
  }

  .renewal-sender-step label {
    font-size: .66rem;
  }

  .renewal-input {
    min-height: 43px;
    border-radius: 11px;
    font-size: .72rem;
  }

  .field-help {
    font-size: .56rem;
    line-height: 1.45;
  }

  .proof-dropzone {
    min-height: 76px;
    padding: 10px;
    gap: 3px;
    border-radius: 12px;
  }

  .proof-dropzone svg {
    width: 22px;
    height: 22px;
  }

  .proof-dropzone b {
    font-size: .7rem;
  }

  .proof-dropzone small {
    font-size: .54rem;
    line-height: 1.4;
  }

  .proof-preview {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    border-radius: 11px;
  }

  .proof-preview img {
    width: 46px;
    height: 44px;
  }

  .proof-preview b {
    font-size: .65rem;
  }

  .proof-preview small,
  .proof-preview button {
    font-size: .56rem;
  }

  .optional-payment-note summary {
    min-height: 40px;
    font-size: .67rem;
  }

  .optional-payment-note .renewal-textarea {
    min-height: 62px;
  }

  .payment-protocol-notice {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: .61rem;
    line-height: 1.5;
  }

  .renewal-message,
  .request-result {
    padding: 9px 10px;
    font-size: .65rem;
  }

  .renewal-actions {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 7px;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  }

  .submit-request-btn,
  .cancel-request-btn,
  .support-fallback-btn {
    min-height: 41px;
    border-radius: 10px;
    padding-inline: 10px;
    font-size: .65rem;
  }

  .submit-request-btn {
    grid-column: auto;
    order: 3;
  }

  .cancel-request-btn {
    order: 1;
  }

  .support-fallback-btn {
    order: 2;
  }
}

@media (max-width: 360px) {
  .plan-choice-grid {
    gap: 4px;
  }

  .plan-choice {
    padding-inline: 4px;
  }

  .plan-choice-head b {
    font-size: .63rem;
  }

  .payment-method-grid-v2 {
    grid-template-columns: 1fr !important;
  }

  .renewal-actions {
    grid-template-columns: 1fr 1fr;
  }

  .submit-request-btn {
    grid-column: 1 / -1;
    order: 1;
  }

  .cancel-request-btn {
    order: 2;
  }

  .support-fallback-btn {
    order: 3;
  }
}
