/* BF GURU landing — order form modal */

.order-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.order-overlay.open {
  opacity: 1;
  visibility: visible;
}

.order-modal {
  width: min(640px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 36px);
  position: relative;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.32s var(--ease);
}

.order-overlay.open .order-modal {
  transform: translateY(0) scale(1);
}

.order-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s;
}

.order-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.order-modal h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.order-sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 22px;
  line-height: 1.5;
}

.order-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(71, 87, 232, 0.12);
  border: 1px solid rgba(123, 138, 255, 0.25);
  font-weight: 700;
  color: var(--blue-light);
}

.order-form {
  display: grid;
  gap: 14px;
}

.order-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.order-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.order-label-row label {
  margin-bottom: 0;
}

.order-hint-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(153, 162, 184, 0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.order-hint-btn:hover,
.order-hint-btn[aria-expanded="true"] {
  background: rgba(123, 138, 255, 0.55);
}

.order-hint-panel {
  display: none;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #4757e8;
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.55);
  font-size: 12px;
  line-height: 1.4;
  overflow-x: auto;
}

.order-hint-panel.is-open {
  display: block;
}

.order-field-creation-mode select {
  margin-bottom: 0;
}

.order-hint-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.order-hint-table th,
.order-hint-table td {
  padding: 8px 10px 8px 0;
  vertical-align: top;
}

.order-hint-table th {
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.order-hint-table tbody tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.order-hint-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

.order-hint-link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.order-hint-link:hover {
  color: #dce2ff;
}

.order-hint-hide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s, opacity 0.2s;
}

.order-hint-hide:hover {
  color: #fff;
  opacity: 1;
}

.order-hint-hide svg {
  flex-shrink: 0;
}

.order-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(71, 87, 232, 0.08);
  border: 1px solid rgba(123, 138, 255, 0.18);
}

.order-examples-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-examples-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.order-examples-link:hover {
  color: #aab6ff;
}

.order-field input,
.order-field select,
.order-field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background-color: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.order-field select {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2399A2B8' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.order-field select option,
.order-field select optgroup {
  background-color: #161b27;
  color: #eaecf3;
}

.order-field input:focus,
.order-field select:focus,
.order-field textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(71, 87, 232, 0.15);
}

.order-field textarea {
  min-height: 96px;
  resize: vertical;
}

.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.order-note {
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.45;
}

.order-error {
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 14px;
  line-height: 1.45;
}

.order-error.visible {
  display: block;
}

.order-submit {
  width: 100%;
  margin-top: 4px;
}

.order-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.order-form-blocked {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.order-form-blocked .order-hint-btn,
.order-form-blocked .order-hint-hide,
.order-form-blocked .order-hint-panel,
.order-form-blocked .order-hint-panel a {
  pointer-events: auto;
}

.order-form-blocked .order-error {
  pointer-events: auto;
  opacity: 1;
}

.order-cta-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  transform: none !important;
  pointer-events: auto;
}

.order-cta-disabled:hover::after {
  transform: translateX(-120%) !important;
}

.order-files {
  font-size: 14px;
}

.order-file-zone {
  position: relative;
}

.order-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.order-file-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 120px;
  padding: 20px 18px;
  border-radius: 14px;
  border: 1.5px dashed rgba(123, 138, 255, 0.35);
  background: linear-gradient(180deg, rgba(71, 87, 232, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-align: center;
}

.order-file-trigger:hover,
.order-file-zone:focus-within .order-file-trigger {
  border-color: var(--blue-light);
  background: linear-gradient(180deg, rgba(71, 87, 232, 0.14) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.order-file-trigger:active {
  transform: scale(0.99);
}

.order-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(71, 87, 232, 0.18);
  border: 1px solid rgba(123, 138, 255, 0.28);
  color: var(--blue-light);
}

.order-file-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.order-file-hint {
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.4;
  max-width: 280px;
}

.order-file-list {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.order-file-list.has-files {
  display: flex;
}

.order-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(71, 87, 232, 0.14);
  border: 1px solid rgba(123, 138, 255, 0.22);
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

.order-file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-file-chip svg {
  flex-shrink: 0;
  color: var(--blue-light);
}

.order-file-zone.drag-over .order-file-trigger {
  border-color: var(--blue-light);
  background: linear-gradient(180deg, rgba(71, 87, 232, 0.2) 0%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: 0 0 0 3px rgba(71, 87, 232, 0.12);
}

@media (max-width: 640px) {
  .order-hint-table {
    min-width: 520px;
  }

  .order-row {
    grid-template-columns: 1fr;
  }

  .order-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .order-modal {
    max-height: 94vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}
