/* V86 — PDP buy box ("Tư vấn ngay / Mua ngay"), callback form and order modal. */

.oakley-order-cta,
.oakley-order-modal {
  --oo-navy: #1b1f3b;
  --oo-ink: #1f2937;
  --oo-muted: #6b7280;
  --oo-line: #e3e5f0;
  --oo-soft: #f5f6fd;
  --oo-danger: #c62828;
  --oo-success: #1b7a3d;
  --oo-gradient: linear-gradient(90deg, #5b21b6 0%, #3b5bdb 55%, #1398e0 100%);
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.oakley-order-cta *,
.oakley-order-modal * { box-sizing: border-box; }

/* ---------------------------------------------------------------- buy box */

.oakley-order-cta {
  width: 100%;
  margin: 16px 0 8px;
  padding: 16px;
  border: 1px solid var(--oo-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfbff 0%, #f4f5fc 100%);
}

.oakley-order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.oakley-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.oakley-order-btn svg { flex: 0 0 auto; }

.oakley-order-btn--consult {
  color: var(--oo-navy) !important;
  background: #eef1ff;
  border: 1px solid #cfd6f6;
}

.oakley-order-btn--buy {
  color: #fff !important;
  background: var(--oo-gradient);
  border: 0;
  box-shadow: 0 6px 16px rgba(76, 58, 200, .25);
}

.oakley-order-btn:hover { transform: translateY(-1px); }
.oakley-order-btn--buy:hover { filter: brightness(1.06); box-shadow: 0 8px 20px rgba(76, 58, 200, .32); }
.oakley-order-btn--consult:hover { background: #e4e9ff; }
.oakley-order-btn:focus-visible { outline: 3px solid #93a4f5; outline-offset: 2px; }

.oakley-callback {
  margin: 16px 0 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--oo-line);
  border-radius: 14px;
}

.oakley-callback__title {
  margin: 0 0 14px;
  color: var(--oo-ink);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.5;
}

.oakley-callback__row {
  display: flex;
  gap: 10px;
}

.oakley-callback__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid #d5d8e3;
  border-radius: 12px;
  background: #fff;
  color: var(--oo-ink);
  font: inherit;
  font-size: 1rem;
}

.oakley-callback__input::placeholder { color: #9ca3af; }
.oakley-callback__input:focus { outline: none; border-color: #6d7be6; box-shadow: 0 0 0 3px rgba(109, 123, 230, .18); }

.oakley-callback__submit {
  flex: 0 0 auto;
  min-width: 128px;
  height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--oo-navy);
  color: #fff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
}

.oakley-callback__submit:hover { background: #2a2f57; }
.oakley-callback__submit[disabled] { opacity: .6; cursor: wait; }

.oakley-callback__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--oo-muted);
  font-size: .8125rem;
  line-height: 1.6;
  cursor: pointer;
}

.oakley-callback__consent input { margin: 3px 0 0; width: 16px; height: 16px; flex: 0 0 auto; }

.oakley-callback__status,
.oakley-order-form__status {
  margin: 8px 0 0;
  font-size: .875rem;
  line-height: 1.5;
}
.oakley-callback__status:empty,
.oakley-order-form__status:empty { display: none; }
.oakley-order-cta .is-error, .oakley-order-modal .is-error { color: var(--oo-danger); }
.oakley-order-cta .is-success, .oakley-order-modal .is-success { color: var(--oo-success); font-weight: 700; }

.oakley-order-cta__note {
  margin: 14px 2px 0;
  color: var(--oo-muted);
  font-size: .8125rem;
  line-height: 1.6;
}

.oakley-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* Sticky header: two small pills in place of the add-to-bag button. */
.oakley-order-cta--compact {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.oakley-order-cta--compact .oakley-order-actions { display: flex; gap: 8px; }
.oakley-order-cta--compact .oakley-order-btn { min-height: 42px; padding: 0 18px; font-size: .9375rem; }

@media (max-width: 480px) {
  .oakley-order-cta { padding: 12px; }
  .oakley-order-btn { font-size: 1rem; gap: 8px; padding: 0 10px; }
  .oakley-callback__submit { min-width: 96px; }
  .oakley-order-cta--compact .oakley-order-btn span { font-size: .875rem; }
  .oakley-order-cta--compact .oakley-order-btn--consult span { display: none; }
}

/* ----------------------------------------------------- colour preview mode */

/* A colour chosen on the page usually has one captured picture: show it alone
 * rather than next to gallery shots of a different colour. */
.oakley-variant-hidden { display: none !important; }
.oakley-variant-lowres img {
  object-fit: contain !important;
  max-width: min(520px, 80%) !important;
  margin: 0 auto !important;
}

/* -------------------------------------------------------------------- modal */

body.oakley-order-open { overflow: hidden !important; }

.oakley-order-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(17, 20, 38, .55);
}
.oakley-order-modal[hidden] { display: none !important; }

.oakley-order-dialog {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  color: var(--oo-ink);
}

.oakley-order-dialog__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  background: #fff;
  border-bottom: 1px solid var(--oo-line);
}

.oakley-order-dialog__title { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--oo-navy); }

.oakley-order-dialog__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--oo-soft);
  color: var(--oo-navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.oakley-order-dialog__close:hover { background: #e7e9f8; }

.oakley-order-dialog__body { padding: 18px 20px 22px; }

.oakley-order-product {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--oo-line);
  border-radius: 14px;
  background: var(--oo-soft);
}
.oakley-order-product__img {
  flex: 0 0 96px;
  width: 96px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
}
.oakley-order-product__name { margin: 0 0 4px; font-size: 1rem; font-weight: 700; }
.oakley-order-product__meta { margin: 0; color: var(--oo-muted); font-size: .875rem; line-height: 1.5; }

.oakley-order-form { margin: 16px 0 0; }

.oakley-order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.oakley-order-field--full { grid-column: 1 / -1; }

.oakley-order-field label {
  display: block;
  margin: 0 0 6px;
  font-size: .875rem;
  font-weight: 700;
  color: var(--oo-ink);
}
.oakley-order-field label .req { color: var(--oo-danger); }

.oakley-order-field input,
.oakley-order-field select,
.oakley-order-field textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d5d8e3;
  border-radius: 10px;
  background: #fff;
  color: var(--oo-ink);
  font: inherit;
  font-size: 1rem;
  letter-spacing: normal;
}
.oakley-order-field textarea { min-height: 84px; resize: vertical; }
.oakley-order-field input:focus,
.oakley-order-field select:focus,
.oakley-order-field textarea:focus { outline: none; border-color: #6d7be6; box-shadow: 0 0 0 3px rgba(109, 123, 230, .18); }
.oakley-order-field.has-error input,
.oakley-order-field.has-error textarea { border-color: var(--oo-danger); }
.oakley-order-field__error { margin: 4px 0 0; color: var(--oo-danger); font-size: .8125rem; }
.oakley-order-field__error:empty { display: none; }

.oakley-order-captcha { margin: 16px 0 0; min-height: 78px; }

.oakley-order-submit {
  width: 100%;
  min-height: 52px;
  margin: 16px 0 0;
  border: 0;
  border-radius: 999px;
  background: var(--oo-gradient);
  color: #fff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
}
.oakley-order-submit[disabled] { opacity: .65; cursor: wait; }

.oakley-order-form__foot { margin: 12px 0 0; color: var(--oo-muted); font-size: .8125rem; line-height: 1.6; text-align: center; }

.oakley-order-success { padding: 12px 4px 4px; text-align: center; }
.oakley-order-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 0 12px;
  border-radius: 50%;
  background: #e6f4ea;
  color: var(--oo-success);
}
.oakley-order-success h3 { margin: 0 0 8px; font-size: 1.375rem; font-weight: 700; color: var(--oo-success); }
.oakley-order-success p { margin: 0 auto 18px; max-width: 440px; color: var(--oo-ink); line-height: 1.6; }

@media (max-width: 560px) {
  .oakley-order-modal { align-items: flex-end; padding: 0; }
  .oakley-order-dialog { max-height: 92vh; border-radius: 20px 20px 0 0; }
  .oakley-order-grid { grid-template-columns: 1fr; }
  .oakley-order-dialog__body { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}

/* ------------------------------------------------ Oakley flyouts (V87) */

/* The Vietnamese global header sits above Oakley's flyout layer, hiding the
 * flyout title ("Màu sắc có sẵn", "Kích cỡ và kiểu dáng"). */
.oo_flyout-overlay-wrapper.open { position: relative; z-index: 2147482000 !important; }
.oo_flyout-overlay-wrapper.open > .oo_flyout-overlay-container,
.oo_flyout-overlay-wrapper.open > .oo_flyout-overlay-background { z-index: 2147482001 !important; }
.oakley-vi-pdp-stock { text-transform: none !important; }
