/* f2p_checkout.css — Task11 Checkout ONE-PAGE (Make → OC Twig) */
#checkout-checkout.f2p-checkout-onepage {
  --co-brand: var(--f2p-brand, #184E3B);
  --co-brand2: var(--f2p-brand2, #123D2E);
  --co-brand-s: var(--f2p-brand-s, #EEF5F1);
  --co-accent: var(--f2p-accent, #F68B1F);
  --co-text: var(--f2p-text, #1D2923);
  --co-text2: var(--f2p-text2, #66736D);
  --co-text3: var(--f2p-text3, #98A39E);
  --co-border: var(--f2p-border, #E2E8E5);
  --co-bg: var(--f2p-bg, #F6F8F7);
  --co-card: var(--f2p-card, #FFFFFF);
  --co-success: var(--f2p-success, #168A52);
  --co-error: var(--f2p-error, #D92D20);
  max-width: 1320px;
  padding-bottom: 48px;
}

#checkout-checkout.f2p-checkout-onepage .f2p-make-breadcrumb {
  margin-bottom: 0;
}

/* ── Hero bar (Make Task11) ── */
.f2p-checkout-hero {
  margin: 0 0 24px;
  background: var(--co-brand);
  border-radius: 16px;
}

.f2p-checkout-hero__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  flex-wrap: wrap;
}

.f2p-checkout-hero__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.f2p-checkout-hero__icon {
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
}

.f2p-checkout-hero__secure {
  margin: 0 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Progress steps ── */
.f2p-checkout-progress {
  margin-bottom: 24px;
}

.f2p-checkout-progress__list {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.f2p-checkout-progress__list::-webkit-scrollbar {
  display: none;
}

.f2p-checkout-progress__item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  padding-right: 12px;
}

.f2p-checkout-progress__item:not(:last-child)::after {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  min-width: 16px;
  margin-left: 8px;
  background: var(--co-border);
  border-radius: 1px;
}

.f2p-checkout-progress__item--done:not(:last-child)::after,
.f2p-checkout-progress__item--active:not(:last-child)::after {
  background: var(--co-brand);
}

.f2p-checkout-progress__dot {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: var(--co-bg);
  color: var(--co-text3);
  border: 2px solid var(--co-border);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.f2p-checkout-progress__item--active .f2p-checkout-progress__dot {
  background: var(--co-brand);
  border-color: var(--co-brand);
  color: #fff;
}

.f2p-checkout-progress__item--done .f2p-checkout-progress__dot {
  background: var(--co-brand);
  border-color: var(--co-brand);
  color: #fff;
  font-size: 11px;
}

.f2p-checkout-progress__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--co-text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f2p-checkout-progress__item--active .f2p-checkout-progress__label {
  color: var(--co-text);
}

.f2p-checkout-progress__item--done .f2p-checkout-progress__label {
  color: var(--co-text2);
}

/* ── Two-column layout ── */
.f2p-checkout-layout--onepage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.f2p-checkout-steps {
  min-width: 0;
}

/* ── Section cards ── */
.f2p-checkout-onepage .f2p-checkout-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.f2p-checkout-onepage .f2p-checkout-section {
  margin: 0;
}

.f2p-checkout-onepage .f2p-checkout-section .panel {
  margin: 0;
  border: 1px solid var(--co-border);
  border-radius: 16px;
  background: var(--co-card);
  box-shadow: none;
  overflow: hidden;
}

.f2p-checkout-onepage .f2p-checkout-section .panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--co-card);
  border-bottom: 1px solid var(--co-border);
  border-radius: 0;
}

.f2p-checkout-onepage .f2p-checkout-section .panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--co-text);
  line-height: 1.3;
}

.f2p-checkout-onepage .f2p-checkout-section .panel-title a {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}

.f2p-checkout-onepage .f2p-checkout-section .panel-title .fa-caret-down {
  display: none;
}

.f2p-checkout-section__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--co-brand);
  color: #fff;
}

.f2p-checkout-onepage .f2p-checkout-section .panel-collapse {
  display: block !important;
  height: auto !important;
  visibility: visible !important;
}

.f2p-checkout-onepage .f2p-checkout-section .panel-collapse.collapse {
  display: block !important;
}

.f2p-checkout-onepage .f2p-checkout-section .panel-body {
  padding: 20px 24px 24px;
  border: 0;
}

.f2p-checkout-onepage .f2p-checkout-section--pending .panel-heading {
  opacity: 0.72;
}

.f2p-checkout-onepage .f2p-checkout-section--done .f2p-checkout-section__num {
  background: var(--co-brand-s);
  color: var(--co-brand);
}

.f2p-checkout-onepage .f2p-checkout-section--active .panel {
  border-color: rgba(24, 78, 59, 0.35);
  box-shadow: 0 0 0 2px rgba(24, 78, 59, 0.08);
}

/* ── Sticky summary sidebar ── */
.f2p-checkout-onepage .f2p-checkout-summary {
  position: relative;
}

.f2p-checkout-onepage .f2p-checkout-summary__card {
  position: sticky;
  top: 96px;
  border: 1px solid var(--co-border);
  border-radius: 16px;
  background: var(--co-card);
  overflow: hidden;
}

.f2p-checkout-onepage .f2p-checkout-summary__head {
  padding: 16px 20px;
  border-bottom: 0;
  background: var(--co-brand);
}

.f2p-checkout-onepage .f2p-checkout-summary__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.f2p-checkout-onepage .f2p-checkout-summary__body {
  padding: 16px 20px;
  font-size: 14px;
}

.f2p-checkout-onepage .f2p-checkout-summary__body .text-muted {
  color: var(--co-text2) !important;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.f2p-checkout-onepage .f2p-checkout-summary__foot {
  padding: 0 20px 20px;
}

.f2p-checkout-onepage .f2p-checkout-summary__protected {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 10px;
  color: var(--co-text3);
}

.f2p-checkout-onepage .f2p-checkout-summary__body .f2p-order-review {
  margin: 0;
}

.f2p-checkout-onepage .f2p-checkout-summary__body .f2p-order-review__payment,
.f2p-checkout-onepage .f2p-checkout-summary__body .f2p-order-review__payment .buttons,
.f2p-checkout-onepage .f2p-checkout-summary__body .f2p-checkout-consent,
.f2p-checkout-onepage .f2p-checkout-summary__body .f2p-checkout-consent__actions {
  display: none !important;
}

/* ── Mobile summary bar ── */
.f2p-checkout-mobile-summary {
  display: none;
  margin-bottom: 16px;
  border: 1px solid var(--co-border);
  border-radius: 16px;
  background: var(--co-card);
  overflow: hidden;
}

.f2p-checkout-mobile-summary__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.f2p-checkout-mobile-summary__toggle-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--co-text);
}

.f2p-checkout-mobile-summary__toggle-left .fa {
  color: var(--co-brand);
}

.f2p-checkout-mobile-summary__chevron {
  color: var(--co-text3);
  transition: transform 0.2s;
}

.f2p-checkout-mobile-summary.is-open .f2p-checkout-mobile-summary__chevron {
  transform: rotate(180deg);
}

.f2p-checkout-mobile-summary__panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--co-border);
}

.f2p-checkout-mobile-summary.is-open .f2p-checkout-mobile-summary__panel {
  display: block;
  padding-top: 12px;
}

/* ── Consent block (inside confirm AJAX) ── */
.f2p-checkout-onepage .f2p-checkout-consent {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--co-border);
  border-radius: 12px;
  background: var(--co-bg);
}

.f2p-checkout-onepage .f2p-checkout-consent__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--co-text);
  margin-bottom: 12px;
}

.f2p-checkout-onepage .f2p-checkout-comment {
  border-radius: 12px;
  border-color: var(--co-border);
  min-height: 80px;
}

/* ── Success / result (common/success) ── */
#common-success.f2p-checkout-result-page {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 48px;
}

#common-success.f2p-checkout-result-page .f2p-checkout-result {
  text-align: center;
  padding: 32px 16px;
}

#common-success.f2p-checkout-result-page .f2p-checkout-result__icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  background: var(--co-brand-s, #EEF5F1);
  color: var(--co-success, #168A52);
  font-size: 46px;
}

#common-success.f2p-checkout-result-page .f2p-checkout-result__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--co-text, #1D2923);
  letter-spacing: -0.01em;
}

#common-success.f2p-checkout-result-page .f2p-checkout-result__message {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--co-text2, #66736D);
  line-height: 1.6;
  text-align: left;
}

#common-success.f2p-checkout-result-page .f2p-checkout-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

#common-success.f2p-checkout-result-page .f2p-checkout-result__actions .btn-primary {
  background: var(--co-brand, #184E3B);
  border-color: var(--co-brand, #184E3B);
  border-radius: 16px;
  padding: 12px 24px;
  font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .f2p-checkout-layout--onepage {
    grid-template-columns: 1fr;
  }

  .f2p-checkout-onepage .f2p-checkout-summary {
    display: none;
  }

  .f2p-checkout-mobile-summary {
    display: block;
  }

  .f2p-checkout-progress__label {
    display: none;
  }

  .f2p-checkout-progress__item {
    flex: 0 0 auto;
    padding-right: 8px;
  }

  .f2p-checkout-hero__secure {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 575px) {
  .f2p-checkout-onepage .f2p-checkout-section .panel-heading,
  .f2p-checkout-onepage .f2p-checkout-section .panel-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .f2p-checkout-hero__inner {
    padding: 16px;
  }

  .f2p-checkout-delivery__row {
    grid-template-columns: 1fr;
  }

  .f2p-checkout-slots {
    grid-template-columns: 1fr;
  }

  .f2p-order-confirm__meta {
    grid-template-columns: 1fr;
  }

  .f2p-checkout-nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .f2p-checkout-nav__next,
  .f2p-checkout-confirm-btn {
    width: 100%;
  }
}

/* ── One active step (макет) ── */
.f2p-checkout-onepage .f2p-checkout-section--pending,
.f2p-checkout-onepage .f2p-checkout-section--done {
  display: none;
}

.f2p-checkout-onepage .f2p-checkout-section--active {
  display: block;
}

/* ── Delivery form ── */
.f2p-checkout-delivery__legend {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--co-text);
}

.f2p-checkout-delivery__method {
  margin-bottom: 20px;
}

.f2p-checkout-delivery__type {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.f2p-checkout-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--co-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: var(--co-text2);
}

.f2p-checkout-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.f2p-checkout-chip.is-active {
  border-color: var(--co-brand);
  color: var(--co-brand);
  background: var(--co-brand-s);
  box-shadow: 0 0 0 1px var(--co-brand);
}

.f2p-checkout-delivery__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.f2p-checkout-delivery .form-control {
  border-radius: 12px;
  border-color: var(--co-border);
  min-height: 44px;
  box-shadow: none;
}

.f2p-checkout-delivery .form-control:focus {
  border-color: var(--co-brand);
  box-shadow: 0 0 0 3px rgba(24, 78, 59, 0.12);
}

.f2p-req {
  color: var(--co-error);
}

.f2p-checkout-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.f2p-checkout-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px 8px;
  border: 1px solid var(--co-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--co-text);
  text-align: center;
}

.f2p-checkout-slot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.f2p-checkout-slot.is-active {
  border-color: var(--co-brand);
  box-shadow: 0 0 0 1px var(--co-brand);
  background: var(--co-brand-s);
  color: var(--co-brand);
}

.f2p-checkout-delivery__schedule,
.f2p-checkout-delivery__comment {
  margin-top: 8px;
  margin-bottom: 16px;
}

/* ── Step nav ── */
.f2p-checkout-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 8px;
}

.f2p-checkout-nav__back {
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: var(--co-text2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.f2p-checkout-nav__back:hover {
  color: var(--co-brand);
}

.f2p-checkout-nav__next {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px !important;
  background: var(--co-accent) !important;
  border-color: var(--co-accent) !important;
  color: #fff !important;
  font-weight: 700;
}

.f2p-checkout-confirm-btn,
.f2p-btn--brand {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px !important;
  background: var(--co-brand) !important;
  border-color: var(--co-brand) !important;
  color: #fff !important;
  font-weight: 700;
}

.f2p-order-confirm__nav .f2p-order-review__payment,
.f2p-order-confirm__nav .buttons,
.f2p-order-confirm__nav .pull-right,
.f2p-cod-confirm {
  margin: 0;
  float: none;
  display: flex;
  justify-content: flex-end;
}

.f2p-order-confirm__nav .f2p-order-review__payment .buttons {
  display: flex !important;
}

/* ── Confirm meta ── */
.f2p-order-confirm__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.f2p-order-confirm__card {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--co-bg);
  border: 1px solid var(--co-border);
}

.f2p-order-confirm__card-label {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--co-text3);
}

.f2p-order-confirm__card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--co-text);
  word-break: break-word;
}

.f2p-order-confirm__card-line {
  margin-top: 4px;
  font-size: 13px;
  color: var(--co-text2);
}

.f2p-order-confirm__items-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--co-text);
}

.f2p-order-review__notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFF8E8;
  color: var(--co-text);
  font-size: 13px;
  font-weight: 600;
}

.f2p-order-review__notice .fa {
  color: var(--co-accent);
}

.f2p-checkout-onepage .f2p-checkout-summary__body .f2p-order-confirm__meta,
.f2p-checkout-onepage .f2p-checkout-summary__body .f2p-order-confirm__items-title,
.f2p-checkout-onepage .f2p-checkout-summary__body .f2p-order-confirm__nav {
  display: none !important;
}
