/* ==========================================================================
   SGM PU College - CMS & Administration Stylesheet
   Theme: Visual Inline Editing, Modals, Management Badges & Actions
   ========================================================================== */

/* Show admin-only controls ONLY when body has .is-admin */
.admin-only {
  display: none !important;
}
body.is-admin .admin-only {
  display: inline-flex !important;
}
body.is-admin div.admin-only,
body.is-admin .admin-block-only {
  display: block !important;
}

/* Floating Action Button (FAB) */
.cms-fab-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.45);
  font-size: 26px;
  cursor: pointer;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body.is-admin .cms-fab-btn {
  display: flex;
}
.cms-fab-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 15px 40px rgba(56, 189, 248, 0.6);
}

/* CMS Floating Menu */
.cms-fab-menu {
  position: fixed;
  bottom: 100px;
  right: 32px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(2, 132, 199, 0.25);
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 1500;
  min-width: 220px;
}
.cms-fab-menu.show {
  display: flex;
  animation: fabMenuIn 0.25s ease forwards;
}

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

.cms-fab-menu-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  padding: 2px 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2px;
  font-weight: 700;
}

.cms-fab-menu-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
}
.cms-fab-menu-item.primary-action {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(56, 189, 248, 0.25));
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}
.cms-fab-menu-item i {
  color: var(--primary-blue);
  font-size: 17px;
  flex-shrink: 0;
}
.cms-fab-menu-item.primary-action i {
  color: #38bdf8;
}
.cms-fab-menu-item:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
}

@keyframes newItemPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 rgba(56, 189, 248, 0.8); }
  50% { transform: scale(1.02); box-shadow: 0 0 30px rgba(56, 189, 248, 0.6); }
  100% { transform: scale(1); box-shadow: none; }
}
.new-item-highlight {
  animation: newItemPulse 0.8s ease forwards;
}

/* Inline Editable Text Hover Visual Cue */
body.is-admin .editable-text {
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, outline 0.2s;
  outline: 1px dashed transparent;
}
body.is-admin .editable-text:hover {
  background: rgba(56, 189, 248, 0.1);
  outline: 1px dashed rgba(56, 189, 248, 0.6);
}
body.is-admin .editable-text:hover::after {
  content: '✎';
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary-blue);
  color: #000;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  pointer-events: none;
}

/* Inline Editable Image Hover Visual Cue */
body.is-admin .editable-image-container {
  position: relative;
  cursor: pointer;
}
body.is-admin .editable-image-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(2, 6, 23, 0.55);
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: inherit;
  z-index: 5;
  pointer-events: none;
}
body.is-admin .editable-image-container:hover::before {
  opacity: 1;
}
.btn-edit-image-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--primary-blue);
  color: var(--primary-blue);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  display: none;
  align-items: center;
  gap: 6px;
  z-index: 6;
  pointer-events: auto;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}
body.is-admin .editable-image-container:hover .btn-edit-image-overlay {
  display: inline-flex;
}

/* Card Admin Action Badges (Top-Right of Cards) */
.card-admin-bar {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.btn-card-ctrl {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}
.btn-card-ctrl.edit {
  background: rgba(2, 132, 199, 0.85);
  color: #fff;
}
.btn-card-ctrl.edit:hover {
  background: #38bdf8;
  color: #000;
  transform: scale(1.1);
}
.btn-card-ctrl.delete {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}
.btn-card-ctrl.delete:hover {
  background: #f43f5e;
  transform: scale(1.1);
}
.btn-card-ctrl.pin {
  background: rgba(251, 191, 36, 0.85);
  color: #000;
}
.btn-card-ctrl.drag-handle {
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  cursor: grab;
}
.btn-card-ctrl.move-prev,
.btn-card-ctrl.move-next,
.btn-card-ctrl.move-up,
.btn-card-ctrl.move-down {
  background: rgba(15, 23, 42, 0.88);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}
.btn-card-ctrl.move-prev:hover,
.btn-card-ctrl.move-next:hover,
.btn-card-ctrl.move-up:hover,
.btn-card-ctrl.move-down:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Slideshow Admin Control Bar (No Overlap Guaranteed!) */
.slideshow-admin-dock {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 30;
}
.btn-slide-admin {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.2s;
}
.btn-slide-admin.add:hover {
  background: #0284c7;
  border-color: #38bdf8;
}
.btn-slide-admin.del:hover {
  background: #ef4444;
  border-color: #f43f5e;
}
.btn-slide-admin.edit-img:hover {
  background: #6366f1;
}

/* Section Header Action Buttons */
.section-admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-section-admin {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-section-admin:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--primary-blue);
}
.btn-section-admin.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Unified Modal Backdrop & Shell */
.cms-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cms-modal-backdrop.open {
  display: flex;
  animation: modalFadeIn 0.2s ease forwards;
}

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

.cms-modal-box {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.15);
  padding: 30px;
  position: relative;
}

.cms-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cms-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cms-modal-title i {
  color: var(--primary-blue);
}

.cms-modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cms-modal-close-btn:hover {
  color: #fff;
}

.cms-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-cms-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cms-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-cms-save {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border: none;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-cms-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}

/* Image Upload Dropzone */
.cms-upload-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  background: rgba(2, 6, 23, 0.5);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.cms-upload-dropzone:hover,
.cms-upload-dropzone.dragover {
  border-color: var(--primary-blue);
  background: rgba(56, 189, 248, 0.08);
}
.cms-upload-icon {
  font-size: 40px;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.cms-image-preview-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #020617;
  margin-bottom: 16px;
  display: none;
}
.cms-image-preview-box.has-image {
  display: block;
}
.cms-image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Toast Notifications */
.cms-toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 6000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.cms-toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cms-toast.saving {
  border-color: rgba(56, 189, 248, 0.4);
}
.cms-toast.saving i {
  color: var(--primary-blue);
  animation: spin 1s linear infinite;
}

.cms-toast.saved {
  border-color: rgba(16, 185, 129, 0.4);
}
.cms-toast.saved i {
  color: var(--accent-emerald);
}

.cms-toast.failed {
  border-color: rgba(239, 68, 68, 0.4);
}
.cms-toast.failed i {
  color: var(--accent-danger);
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

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

/* ==========================================================================
   Interactive Canvas Cropper Styles
   ========================================================================== */
.cms-crop-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 12px;
}
.crop-aspect-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.crop-aspect-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-crop-aspect {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-crop-aspect:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: #38bdf8;
}
.btn-crop-aspect.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}
.cms-crop-viewport {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 300px;
  background: #090d16;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.cms-crop-viewport:active {
  cursor: grabbing;
}
#imageCropCanvas {
  pointer-events: none;
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.crop-overlay-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #38bdf8;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  box-sizing: border-box;
  transition: border-radius 0.2s ease;
}
.crop-overlay-guide.circle {
  border-radius: 50%;
  border: 2px dashed #38bdf8;
}
.crop-grid-line {
  position: absolute;
  background: rgba(56, 189, 248, 0.25);
  pointer-events: none;
}
.crop-grid-line.h1 { top: 33.33%; left: 0; right: 0; height: 1px; }
.crop-grid-line.h2 { top: 66.66%; left: 0; right: 0; height: 1px; }
.crop-grid-line.v1 { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.crop-grid-line.v2 { left: 66.66%; top: 0; bottom: 0; width: 1px; }
.crop-controls-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 440px;
}
.crop-zoom-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}
.crop-slider {
  flex: 1;
  accent-color: #38bdf8;
  cursor: pointer;
  height: 6px;
}
.crop-tool-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-crop-tool {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.btn-crop-tool:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}
.crop-hint-text {
  font-size: 11.5px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
  margin-top: 4px;
}

/* Live Cropper File Bar & Live Preview Frame */
.crop-file-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13px;
  margin-bottom: 4px;
}
.crop-file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-crop-change {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.btn-crop-change:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}
.crop-live-preview-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 440px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.crop-preview-title {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}
.crop-preview-frame {
  max-width: 160px;
  max-height: 110px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.crop-preview-frame.circle {
  border-radius: 50% !important;
  width: 90px !important;
  height: 90px !important;
}
.crop-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =======================================================
   Section Drag & Drop Reordering Engine
   ======================================================= */
.section-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.12);
  border: 1px dashed rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  cursor: grab;
  cursor: -webkit-grab;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.2s ease;
  touch-action: none;
}
.section-drag-handle:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}
.section-drag-handle:active {
  cursor: grabbing;
  cursor: -webkit-grabbing;
  background: rgba(56, 189, 248, 0.35);
}
.section-drag-handle i {
  font-size: 15px;
}
.drag-handle-hint {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Quick Move Buttons */
.btn-section-move {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #cbd5e1 !important;
}
.btn-section-move:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3) !important;
}

/* Dragging State on Section */
.reorderable-section.is-dragging,
.gallery-section-block.is-dragging,
.achievements-category-group.is-dragging,
.staff-section-group.is-dragging {
  opacity: 0.45 !important;
  border: 2px dashed #38bdf8 !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Real-Time Drop Insertion Line Indicator */
.section-drop-indicator-line {
  position: absolute;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8, #38bdf8, #0284c7);
  background-size: 200% 100%;
  border-radius: 4px;
  box-shadow: 0 0 14px #38bdf8, 0 0 4px #fff;
  z-index: 9999;
  pointer-events: none;
  animation: glowMove 1.5s infinite linear;
}

@keyframes glowMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Success Flash Animation upon drop/move */
.drop-success-flash {
  animation: flashSuccessSection 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes flashSuccessSection {
  0% {
    box-shadow: 0 0 0 3px #38bdf8, 0 8px 30px rgba(56, 189, 248, 0.4);
    transform: scale(1.005);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

.section-drag-handle * {
  pointer-events: none;
}

/* Light Theme Adjustments */
body.theme-light .btn-card-ctrl.move-prev,
body.theme-light .btn-card-ctrl.move-next,
body.theme-light .btn-card-ctrl.move-up,
body.theme-light .btn-card-ctrl.move-down {
  background: #ffffff !important;
  color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.4) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}
body.theme-light .btn-card-ctrl.move-prev:hover,
body.theme-light .btn-card-ctrl.move-next:hover,
body.theme-light .btn-card-ctrl.move-up:hover,
body.theme-light .btn-card-ctrl.move-down:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}
body.theme-light .section-drag-handle {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7;
}
body.theme-light .section-drag-handle:hover {
  background: rgba(2, 132, 199, 0.18);
  border-color: #0284c7;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.25);
}
body.theme-light .btn-section-move {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #334155 !important;
}
body.theme-light .btn-section-move:hover {
  background: rgba(2, 132, 199, 0.15) !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

/* Staff Card Action Buttons */
.btn-card-ctrl.edit-frame {
  background: rgba(14, 165, 233, 0.85);
  color: #fff;
}
.btn-card-ctrl.edit-frame:hover {
  background: #38bdf8;
  color: #0b1329;
  transform: scale(1.1);
}
.btn-card-ctrl.toggle-shape {
  background: rgba(99, 102, 241, 0.85);
  color: #fff;
}
.btn-card-ctrl.toggle-shape:hover {
  background: #818cf8;
  color: #0b1329;
  transform: scale(1.1);
}
.btn-card-ctrl.toggle-size {
  background: rgba(245, 158, 11, 0.85);
  color: #000;
}
.btn-card-ctrl.toggle-size:hover {
  background: #fbbf24;
  transform: scale(1.1);
}

/* Staff Frame & Sizing Modal Controls */
.frame-card-option {
  position: relative;
  cursor: pointer;
  display: block;
}
.frame-card-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.frame-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  transition: all 0.2s ease;
  color: #f1f5f9;
}
.frame-card-content.small {
  padding: 10px 8px;
}
.frame-card-option input[type="radio"]:checked + .frame-card-content {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}
.frame-card-content:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.5);
}

/* Light Theme Adjustments for Frame Modal */
body.theme-light .frame-card-content {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}
body.theme-light .frame-card-option input[type="radio"]:checked + .frame-card-content {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.25);
}


