/* Hallmark · component: checkout controls · genre: commerce · theme: native OpenCart
 * States: default, hover, focus, active, disabled, loading, error, success.
 * Pre-emit critique: P4 H4 E4 S5 R5 V4. Page layout and theme colours are retained.
 */
#custom-checkout {
    --cc-control-border: #ddd;
    --cc-control-surface: #fff;
    --cc-control-hover: #f5f5f5;
    --cc-control-ink: #555;
    --cc-control-focus: #1f90bb;
    --cc-control-error: #a94442;
    --cc-control-success: #3c763d;
    --cc-control-clear: transparent;
    margin-bottom: 40px;
}
#custom-checkout [hidden] { display: none !important; }
#custom-checkout .cc-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "items" "form" "final"; gap: 20px; align-items: start; }
#custom-checkout .cc-items { grid-area: items; }
#custom-checkout .cc-form { grid-area: form; min-width: 0; }
#custom-checkout .cc-final { grid-area: final; }
#custom-checkout .cc-grid > .panel, #custom-checkout .cc-form > .panel:last-child { margin-bottom: 0; }
#custom-checkout .cc-field-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
#custom-checkout .cc-wide { grid-column: 1 / -1; }
#custom-checkout .cc-field-grid .form-group { min-width: 0; }
#custom-checkout .cc-spread { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
#custom-checkout .cc-cart-line { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
#custom-checkout .cc-cart-line img { width: 64px; height: 64px; object-fit: contain; }
#custom-checkout .cc-cart-controls { margin-top: 8px; }
#custom-checkout .cc-cart-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
#custom-checkout .cc-cart-heading > strong { flex: 1; }
#custom-checkout .cc-stepper { display: inline-flex; align-items: stretch; flex-shrink: 0; }
#custom-checkout .cc-count { display: inline-flex; min-width: 40px; height: 44px; padding: 0 8px; align-items: center; justify-content: center; border-top: 1px solid var(--cc-control-border); border-bottom: 1px solid var(--cc-control-border); font: inherit; font-weight: 600; }
#custom-checkout .cc-stepper .cc-action { width: 44px; height: 44px; padding: 0; flex-shrink: 0; border-radius: 4px 0 0 4px; }
#custom-checkout .cc-stepper .cc-action:last-child { border-radius: 0 4px 4px 0; }
#custom-checkout .cc-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.25; text-shadow: none; box-shadow: none; white-space: nowrap; touch-action: manipulation; }
#custom-checkout .cc-action.btn-default { color: var(--cc-control-ink); background-color: var(--cc-control-surface); background-image: none; border-color: var(--cc-control-border); }
#custom-checkout .cc-action:focus-visible, #custom-checkout .cc-action.is-focus { outline: 2px solid var(--cc-control-focus); outline-offset: 2px; }
#custom-checkout .cc-action:active:not(:disabled), #custom-checkout .cc-action.is-active { transform: translateY(1px); }
#custom-checkout .cc-action:disabled { opacity: .55; cursor: not-allowed; }
#custom-checkout .cc-action[aria-busy="true"] { cursor: progress; }
#custom-checkout .cc-action[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: var(--cc-control-clear); border-radius: 50%; animation: cc-control-spin .7s linear infinite; flex-shrink: 0; }
#custom-checkout .cc-action[data-state="error"] { border-color: var(--cc-control-error); outline: 1px solid var(--cc-control-error); outline-offset: 1px; }
#custom-checkout .cc-action[data-state="success"] { border-color: var(--cc-control-success); }
#custom-checkout .cc-action.cc-remove { width: 44px; height: 44px; padding: 0; flex-shrink: 0; margin-top: -8px; margin-right: -8px; background-color: var(--cc-control-clear); border-color: var(--cc-control-clear); font-size: 18px; }
#custom-checkout .cc-discount-input { display: flex; align-items: stretch; gap: 8px; }
#custom-checkout .cc-discount-input input { min-width: 0; height: 44px; }
#custom-checkout .cc-discount { min-width: 96px; flex-shrink: 0; }
#custom-checkout #cc-submit { width: 100%; min-height: 50px; margin-top: 12px; padding: 12px 16px; font-size: 19px; font-weight: 700; }
@media (hover: hover) {
    #custom-checkout .cc-action.btn-default:hover:not(:disabled), #custom-checkout .cc-action.btn-default.is-hover { background-color: var(--cc-control-hover); border-color: var(--cc-control-ink); }
    #custom-checkout .cc-action.cc-remove:hover:not(:disabled), #custom-checkout .cc-action.cc-remove.is-hover { color: var(--cc-control-error); border-color: var(--cc-control-error); }
}
@media (prefers-reduced-motion: reduce) {
    #custom-checkout .cc-action[aria-busy="true"]::before { animation: none; }
}
@keyframes cc-control-spin { to { transform: rotate(360deg); } }
#custom-checkout .cc-method { display: flex; gap: 10px; align-items: start; padding: 12px 0; width: 100%; cursor: pointer; font-weight: normal; }
#custom-checkout .cc-method input { margin-top: 3px; flex-shrink: 0; }
#custom-checkout .cc-method > span { flex: 1; min-width: 0; }
#custom-checkout .cc-method > strong { white-space: nowrap; }
#custom-checkout .cc-method .help-block { margin: 4px 0 0; }
#custom-checkout summary { display: list-item; list-style-position: inside; cursor: pointer; padding: 12px 0; }
#custom-checkout .cc-totals { display: grid; gap: 12px; padding: 16px 0; }
#custom-checkout .cc-grand-total { font-size: 18px; margin-top: 8px; }
#custom-checkout .btn, #custom-checkout input[type=checkbox], #custom-checkout input[type=radio] { touch-action: manipulation; }
#custom-checkout .btn { min-height: 44px; }
#custom-checkout #cc-native:empty { display: none; }
#custom-checkout .cc-sdk-pending { pointer-events: none; opacity: .55; }
#custom-checkout.cc-custom-colour a, #custom-checkout.cc-custom-colour .btn-link { color: var(--cc-accent); }
#custom-checkout.cc-custom-colour #cc-submit, #custom-checkout.cc-custom-colour .cc-native-styled .btn-primary { background-color: var(--cc-accent); background-image: none; border-color: var(--cc-accent); }
#custom-checkout .has-error .control-label { display: block; }
#custom-checkout .cc-cart-line strong, #custom-checkout h1, #custom-checkout h2 { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 899px) {
    #custom-checkout .form-control { min-height: 44px; font-size: 16px; }
    #custom-checkout .cc-form .panel-heading .btn-link { padding: 0; }
}
@media (min-width: 520px) {
    #custom-checkout .cc-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
    #custom-checkout .cc-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); grid-template-areas: "form items" "form final"; grid-template-rows: auto minmax(0, 1fr); }
}

#custom-checkout .cc-action.btn-primary.is-hover { filter: brightness(.94); }

/* The native cart caption may contain a long formatted amount at tablet widths. */
body.cc-checkout-active #cart > .btn { white-space: normal; overflow-wrap: anywhere; }
