/* --- MODALS & OVERLAYS STYLES --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
  from { transform: translateY(16px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal h3 {
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.modal p {
  color: var(--text-dim);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* Стили полноэкранного редактора сценария */
.modal-scenario-content {
  max-width: 720px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

/* Стили карточек медиатеки и аудиотеки */
.vault-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .modal {
    width: 95% !important;
    max-width: 95% !important;
    padding: 16px 14px !important;
    border-radius: 10px !important;
    max-height: 90vh !important;
  }
  .vault-modal-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    gap: 8px !important;
    max-height: 280px !important;
  }
  .modal-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* --- TARIFFS & PAYMENT STYLES --- */
.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.tariff-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.2s ease;
}

.tariff-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(197, 160, 89, 0.35);
  transform: translateY(-2px);
}

.tariff-card.highlight {
  border-color: rgba(197, 160, 89, 0.6);
  background: linear-gradient(180deg, rgba(197, 160, 89, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.tariff-badge {
  position: absolute;
  top: -9px;
  right: 12px;
  background: linear-gradient(135deg, #c5a059, #a8843c);
  color: #0c0e14;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.tariff-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.tariff-price {
  font-size: 22px;
  font-weight: 800;
  color: #c5a059;
  margin: 6px 0;
}

.tariff-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
  margin-bottom: 14px;
  flex-grow: 1;
}

.tariff-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.tariff-btn:hover {
  background: #c5a059;
  color: #0c0e14;
  border-color: #c5a059;
}

/* Оформление заказа и загрузка чека */
.checkout-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sber-pay-btn {
  background: #21a038;
  background: linear-gradient(135deg, #1fa343 0%, #15732e 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 163, 67, 0.3);
  transition: all 0.2s ease;
}

.sber-pay-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.receipt-dropzone {
  border: 2px dashed rgba(197, 160, 89, 0.3);
  background: rgba(197, 160, 89, 0.02);
  border-radius: 10px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.receipt-dropzone:hover, .receipt-dropzone.dragover {
  border-color: #c5a059;
  background: rgba(197, 160, 89, 0.06);
}
