/* ============================================================================
 * Copyright (c) 2026 IASK Solutions LLC. All rights reserved.
 * premium-ui.css — additive aesthetic layer (loaded AFTER style.css)
 *
 * Pure visual polish: ambient background glow, glassmorphism on cards/modals,
 * gradient primary buttons with tactile hover/active motion, stronger focus
 * glows, cleaner disabled states, and subtle hover lift on cards.
 *
 * REVERTING: this file only overrides existing selectors and adds no markup or
 * behaviour, so it is safe to remove. To disable the whole premium look, delete
 * the <link ... premium-ui.css> line in templates/base.html (or revert the
 * commit that added this file). Nothing in style.css or the JS depends on it.
 * ========================================================================== */

/* ── Ambient background glow ───────────────────────────────────────────────
 * Gives surfaces something to refract and makes the page feel "lit". Fixed,
 * behind everything, non-interactive. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55vw 48vh at 12% -8%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(48vw 42vh at 96% -2%, rgba(99, 102, 241, 0.12), transparent 55%),
    radial-gradient(40vw 40vh at 50% 108%, rgba(124, 58, 237, 0.08), transparent 60%);
}

/* ── Glassmorphism for primary surfaces ────────────────────────────────────
 * Applied to the big content cards and modal dialogs only (not the many small
 * file cards, to avoid stacking dozens of blur layers). */
.card,
.modal-dialog {
  background: rgba(26, 29, 38, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 50px rgba(5, 7, 12, 0.45);
}

/* ── Primary buttons: gradient + tactile motion ───────────────────────────── */
.btn-primary,
.primary-command {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  border-color: transparent;
}
.btn-primary:hover,
.primary-command:hover {
  background: linear-gradient(135deg, #9472f8 0%, #6D28D9 100%);
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}
.btn-primary:active,
.primary-command:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
}

/* ── Secondary buttons: gentle lift + brand-tinted border on hover ────────── */
.btn-secondary {
  transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 6px 16px rgba(5, 7, 12, 0.35);
}

/* ── Stronger brand focus glow on inputs ──────────────────────────────────── */
.form-input:focus,
.dashboard-search-input:focus,
input[type="search"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.28);
}

/* ── Cleaner disabled command-bar buttons (de-muddy) ───────────────────────
 * Read as ghosted/inactive instead of a dead grey block. */
.command-button:disabled,
.command-button:disabled:hover {
  background: transparent;
  color: var(--text-muted);
  opacity: 0.5;
  box-shadow: none;
}

/* ── File/folder cards: subtle hover lift ─────────────────────────────────── */
.file-card {
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 180ms ease, border-color 180ms ease;
}
.file-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(5, 7, 12, 0.4);
  border-color: rgba(124, 58, 237, 0.35);
}

/* ── Mode tabs: a touch of life ───────────────────────────────────────────── */
.mode-tab {
  transition: transform 160ms cubic-bezier(0.4, 0, 0.2, 1), border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.mode-tab:hover {
  transform: translateY(-1px);
}
.mode-tab.active {
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.4), 0 8px 24px rgba(124, 58, 237, 0.18);
}

/* ── Respect reduced-motion preferences ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .primary-command,
  .btn-secondary,
  .file-card,
  .mode-tab,
  .cookie-banner {
    transition: none;
  }
  .btn-primary:hover,
  .primary-command:hover,
  .btn-secondary:hover,
  .file-card:hover,
  .mode-tab:hover {
    transform: none;
  }
}

/* ── Cookie Consent Banner ────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 9999;
  background: rgba(26, 29, 38, 0.85);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(5, 7, 12, 0.55);
  padding: 16px 24px;
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1), transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner.hidden {
  display: none !important;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-banner-text {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  color: #D1D5DB;
  line-height: 1.5;
}

.cookie-icon {
  flex-shrink: 0;
  color: #8B5CF6;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.cookie-link {
  color: #8B5CF6;
  text-decoration: underline;
  transition: color 150ms ease;
}

.cookie-link:hover {
  color: #A78BFA;
}

.cookie-banner-actions {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 16px;
    left: 16px;
    right: 16px;
    padding: 16px;
  }
  
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .cookie-banner-actions {
    text-align: right;
  }
}

