/* ════════════════════════════════════════════════════════
   ADMIN QUICK — FAB button + modal styles
   ════════════════════════════════════════════════════════ */

/* FAB - Floating Action Button */
.admin-quick-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b7cfa 0%, #7c5bf5 50%, #9f5bea 100%);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.fab-main:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
}
.fab-main.open {
  transform: rotate(45deg);
}

.fab-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
  animation: fabFadeIn 0.2s ease;
}
.fab-menu.open {
  display: flex;
}

@keyframes fabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fab-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 99px;
  background: #fff;
  color: #1a1a3e;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: transform 0.15s;
  white-space: nowrap;
}
.fab-menu button:hover {
  transform: translateX(-4px);
  background: linear-gradient(135deg, #e8eeff, #e5deff);
}
.fab-menu button span {
  font-size: 18px;
}

/* Edit Button (trên trang chi tiết) */
.admin-quick-edit {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9990;
  padding: 12px 20px;
  border-radius: 99px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
  transition: transform 0.2s;
  text-decoration: none;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}
.admin-quick-edit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5);
}

/* Modal */
.aq-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9995;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.aq-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.aq-modal-large {
  max-width: 900px;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.aq-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.aq-modal-title {
  font-family: var(--font-display, 'Quicksand', 'Be Vietnam Pro', sans-serif);
  font-weight: 800;
  font-size: 20px;
  color: #1a1a3e;
}

.aq-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}
.aq-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: rotate(90deg);
}

.aq-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.aq-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  background: rgba(99, 102, 241, 0.02);
  border-radius: 0 0 20px 20px;
}

/* Form */
.aq-form .form-group {
  margin-bottom: 14px;
}
.aq-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.aq-form .form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
  color: #3a3a6e;
}
.aq-form .form-label .required {
  color: #ef4444;
}

.aq-form .form-input,
.aq-form .form-textarea,
.aq-form .form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e0e7ff;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a3e;
  outline: none;
  transition: 0.2s;
}
.aq-form .form-input:focus,
.aq-form .form-textarea:focus,
.aq-form .form-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.aq-form .form-textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  line-height: 1.5;
}

/* Editor (markdown split view) */
.aq-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.aq-pane {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e7ff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.aq-pane-header {
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.05);
  font-size: 12px;
  font-weight: 700;
  color: #3a3a6e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.aq-pane textarea {
  flex: 1;
  width: 100%;
  padding: 12px;
  border: none;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  background: transparent;
}

.aq-preview {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  line-height: 1.6;
  font-size: 14px;
  color: #1a1a3e;
}
.aq-preview h1, .aq-preview h2, .aq-preview h3 {
  font-family: var(--font-display, 'Quicksand', 'Be Vietnam Pro', sans-serif);
  margin: 12px 0 6px;
}
.aq-preview h2 { font-size: 20px; font-weight: 800; color: #6366f1; }
.aq-preview h3 { font-size: 16px; font-weight: 700; color: #6366f1; }
.aq-preview p { margin-bottom: 8px; }
.aq-preview ul, .aq-preview ol { margin: 8px 0 8px 20px; }
.aq-preview code {
  background: rgba(99, 102, 241, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #6366f1;
}
.aq-preview blockquote {
  border-left: 3px solid #6366f1;
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.05);
  margin: 8px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid transparent;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #6b8eff 0%, #8b6bff 100%);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.btn-secondary {
  background: #fff;
  color: #3a3a6e;
  border-color: #e0e7ff;
}
.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* Toast */
.aq-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aq-toast {
  background: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #6366f1;
  min-width: 260px;
  max-width: 380px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 14px;
  animation: toastSlideIn 0.3s ease;
  transition: opacity 0.3s, transform 0.3s;
}

.aq-toast-success { border-left-color: #10b981; }
.aq-toast-error { border-left-color: #ef4444; }
.aq-toast-warn { border-left-color: #f59e0b; }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .admin-quick-fab {
    bottom: 16px;
    right: 16px;
  }
  .fab-main {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
  .aq-modal {
    max-height: 95vh;
    border-radius: 16px;
  }
  .aq-editor {
    grid-template-columns: 1fr;
  }
  .aq-form .form-row {
    grid-template-columns: 1fr;
  }
  .aq-modal-footer {
    flex-wrap: wrap;
  }
  .admin-quick-edit {
    bottom: 16px;
    left: 16px;
    font-size: 13px;
    padding: 10px 16px;
  }
}
