/* Online Order Form — multi-step modal */

.oo-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow-y: auto;
}
.oo-overlay.oo-open {
  display: flex;
}

.oo-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 95vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  animation: ooSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ooSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.oo-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.oo-close:hover { background: #e2e8f0; color: #1e293b; }

/* Progress */
.oo-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}
.oo-pstep {
  display: flex;
  align-items: center;
  gap: 8px;
}
.oo-pnum {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.oo-plbl {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  transition: color 0.3s;
}
.oo-pstep--active .oo-pnum {
  background: #0091D5;
  color: #fff;
}
.oo-pstep--active .oo-plbl { color: #1e293b; }
.oo-pstep--done .oo-pnum {
  background: #10B981;
  color: #fff;
}
.oo-pstep--done .oo-plbl { color: #10B981; }
.oo-pline {
  width: 40px;
  height: 2px;
  background: #e2e8f0;
  margin: 0 8px;
  transition: background 0.3s;
}
.oo-pline--done { background: #10B981; }

/* Steps */
.oo-step { animation: ooFadeIn 0.3s ease; }
.oo-step--hidden { display: none !important; }
@keyframes ooFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.oo-title {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px;
  line-height: 1.3;
}
.oo-sub {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Tariff Cards */
.oo-tariffs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.oo-tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
  background: #fff;
}
.oo-tcard:hover {
  border-color: #0091D5;
  box-shadow: 0 4px 16px rgba(0, 145, 213, 0.12);
}
.oo-tcard input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.oo-tcard:has(input:checked) {
  border-color: #0091D5;
  background: #f0f9ff;
  box-shadow: 0 4px 20px rgba(0, 145, 213, 0.18);
}
.oo-tcard:has(input:checked) .oo-tcheck {
  color: #0091D5;
  opacity: 1;
}
.oo-tcard--promo {
  border-color: #f97316;
  background: linear-gradient(180deg, #fffbeb, #fff);
}
.oo-tcard--promo:has(input:checked) {
  border-color: #f97316;
  background: #fffbeb;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.2);
}
.oo-tcard--best {
  border-color: #10B981;
}

.oo-tbadge {
  position: absolute;
  top: -10px;
  right: -6px;
  background: #f97316;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}
.oo-tbadge--best {
  background: #10B981;
}

.oo-tspeed {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}
.oo-tprice {
  margin-bottom: 8px;
}
.oo-tprice-num {
  font-size: 28px;
  font-weight: 800;
  color: #0091D5;
}
.oo-tcard--promo .oo-tprice-num { color: #f97316; }
.oo-tprice-cur {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.oo-tfeats {
  list-style: none;
  padding: 0;
  margin: 0;
}
.oo-tfeats li {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}
.oo-tfeats li::before {
  content: "✓ ";
  color: #10B981;
  font-weight: 700;
}

.oo-tcheck {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #cbd5e1;
  opacity: 0.4;
  transition: all 0.2s;
}

/* Form Fields */
.oo-field {
  margin-bottom: 16px;
}
.oo-field--half { flex: 1; min-width: 0; }
.oo-row {
  display: flex;
  gap: 12px;
}
.oo-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}
.oo-opt {
  font-weight: 400;
  color: #94a3b8;
}
.oo-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.oo-input:focus {
  border-color: #0091D5;
  box-shadow: 0 0 0 3px rgba(0, 145, 213, 0.1);
}
.oo-input::placeholder { color: #94a3b8; }
.oo-input--error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}
.oo-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Field hint */
.oo-field-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  min-height: 18px;
  line-height: 1.4;
}
.oo-hint-icon {
  color: #0091D5;
  font-weight: 700;
}

/* Autocomplete */
.oo-ac-wrap {
  position: relative;
}
.oo-ac-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 2px solid #0091D5;
  border-top: none;
  border-radius: 0 0 10px 10px;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.oo-ac-item {
  padding: 10px 14px;
  font-size: 14px;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.15s;
}
.oo-ac-item:hover, .oo-ac-item.oo-ac-active {
  background: #f0f9ff;
}
.oo-ac-item mark {
  background: #fef3c7;
  border-radius: 2px;
  padding: 0 1px;
}
.oo-ac-type {
  float: right;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}
.oo-input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Time Buttons */
.oo-time-btns {
  display: flex;
  gap: 8px;
}
.oo-time-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.oo-time-btn input { position: absolute; opacity: 0; pointer-events: none; }
.oo-time-btn--active, .oo-time-btn:has(input:checked) {
  border-color: #0091D5;
  background: #f0f9ff;
  color: #0091D5;
}

/* Agreement Checkbox */
.oo-agree { margin: 20px 0 16px; }
.oo-chk-label {
  display: flex;
  gap: 10px;
  cursor: pointer;
  align-items: flex-start;
}
.oo-chk-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 5px;
  position: relative;
  transition: all 0.2s;
  margin-top: 1px;
}
.oo-chk-label input { position: absolute; opacity: 0; pointer-events: none; }
.oo-chk-label input:checked + .oo-chk-box {
  background: #0091D5;
  border-color: #0091D5;
}
.oo-chk-label input:checked + .oo-chk-box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.oo-chk-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}
.oo-chk-text a {
  color: #0091D5;
  text-decoration: underline;
}

/* Error */
.oo-err {
  font-size: 13px;
  color: #ef4444;
  margin-bottom: 8px;
  min-height: 20px;
}

/* Buttons */
.oo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.oo-btn--next, .oo-btn--submit {
  width: 100%;
  background: #0091D5;
  color: #fff;
}
.oo-btn--next:hover:not(:disabled), .oo-btn--submit:hover:not(:disabled) {
  background: #007bb5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 145, 213, 0.3);
}
.oo-btn--next:disabled, .oo-btn--submit:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}
.oo-btn--back {
  background: #f1f5f9;
  color: #64748b;
}
.oo-btn--back:hover {
  background: #e2e8f0;
}
.oo-btn--close {
  width: 100%;
  background: #f1f5f9;
  color: #475569;
  margin-top: 16px;
}
.oo-btn--close:hover { background: #e2e8f0; }
.oo-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.oo-btn-row .oo-btn--back { flex: 0 0 auto; }
.oo-btn-row .oo-btn--next, .oo-btn-row .oo-btn--submit { flex: 1; }

.oo-btn--submit {
  background: linear-gradient(135deg, #10B981, #059669);
}
.oo-btn--submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Loading spinner */
@keyframes ooSpin { to { transform: rotate(360deg); } }
.oo-btn-loading svg {
  animation: ooSpin 1s linear infinite;
}

/* Success */
.oo-success { text-align: center; }
.oo-sicon { margin-bottom: 20px; }
@keyframes ooScaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.oo-sicon svg { animation: ooScaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.oo-stext {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 20px;
}
.oo-ssummary {
  background: #f0f9ff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
  font-size: 14px;
  color: #1e293b;
  line-height: 1.8;
}
.oo-ssummary strong { color: #0091D5; }
.oo-sphone {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 16px;
}
.oo-sphone a {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #0091D5;
  text-decoration: none;
  margin-top: 4px;
}
.oo-tg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #0088cc;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.oo-tg-btn:hover {
  background: #006daa;
  transform: translateY(-1px);
}

/* Floating CTA Button */
.oo-float-cta {
  position: fixed;
  bottom: 100px;
  left: 20px;
  z-index: 9996;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #0091D5, #0077b5);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 145, 213, 0.4);
  transition: all 0.3s;
  font-family: inherit;
  animation: ooFloatPulse 3s ease-in-out infinite;
}
.oo-float-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 145, 213, 0.5);
}
@keyframes ooFloatPulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(0, 145, 213, 0.4); }
  50% { box-shadow: 0 6px 24px rgba(0, 145, 213, 0.6), 0 0 40px rgba(0, 145, 213, 0.2); }
}
.oo-float-cta svg {
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .oo-modal {
    padding: 28px 20px 24px;
    border-radius: 16px;
    max-height: 90vh;
  }
  .oo-tariffs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .oo-tcard { padding: 14px 8px 12px; }
  .oo-tspeed { font-size: 14px; }
  .oo-tprice-num { font-size: 24px; }
  .oo-tfeats li { font-size: 11px; }
  .oo-plbl { display: none; }
  .oo-pline { width: 24px; }
  .oo-title { font-size: 20px; }
  .oo-row { flex-direction: column; gap: 0; }
  .oo-time-btns { flex-wrap: wrap; }
  .oo-time-btn { flex: 1 1 auto; min-width: 80px; }
  .oo-float-cta span.oo-float-text { display: none; }
  .oo-float-cta { padding: 14px; border-radius: 50%; }
}

/* Scrollbar for modal */
.oo-modal::-webkit-scrollbar { width: 6px; }
.oo-modal::-webkit-scrollbar-track { background: transparent; }
.oo-modal::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.oo-modal::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Fallback for browsers without :has() support */
.oo-tcard--checked {
  border-color: #0091D5;
  background: #f0f9ff;
  box-shadow: 0 4px 20px rgba(0, 145, 213, 0.18);
}
.oo-tcard--checked .oo-tcheck { color: #0091D5; opacity: 1; }
.oo-tcard--promo.oo-tcard--checked {
  border-color: #f97316;
  background: #fffbeb;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.2);
}
.oo-time-btn--checked {
  border-color: #0091D5;
  background: #f0f9ff;
  color: #0091D5;
}
.oo-chk-label--checked .oo-chk-box {
  background: #0091D5;
  border-color: #0091D5;
}
.oo-chk-label--checked .oo-chk-box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* No scroll on body when modal open */
body.oo-noscroll { overflow: hidden; }
