/*
 * Homepage premium theme - custom.css
 * Overrides the default Homepage styling for a modern, aesthetic dashboard.
 * Loaded automatically from /etc/homepage/custom.css.
 * Light + dark aware via CSS custom properties on html.theme-light / html.theme-dark.
 */

/* ---------- Background: smooth animated gradient ---------- */
html {
  min-height: 100%;
}

body {
  background: #0f172a !important; /* fallback */
  background-attachment: fixed;
}

/* Animated mesh-style gradient, sits behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(at 15% 20%, rgba(99, 102, 241, 0.35), transparent 50%),
    radial-gradient(at 85% 15%, rgba(236, 72, 153, 0.22), transparent 50%),
    radial-gradient(at 70% 85%, rgba(56, 189, 248, 0.25), transparent 55%),
    radial-gradient(at 20% 90%, rgba(167, 139, 250, 0.22), transparent 50%);
  background-size: 200% 200%;
  animation: homepageAurora 24s ease-in-out infinite;
}

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

/* Soften the aurora in light theme */
html.theme-light body::before {
  opacity: 0.55;
}

/* ---------- Layout: container polish ---------- */
.main-content {
  min-height: 100vh;
}

/* ---------- Info widgets (greeting / search / clock) ---------- */
.information-widgets {
  padding: 1.5rem 1.25rem;
}

.information-widget-greeting span {
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

/* ---------- Search box ---------- */
/* Make the search input look like a premium glass pill */
.search-widget form input,
.search-widget input {
  border-radius: 9999px !important;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transition: all 0.2s ease;
}

html.theme-light .search-widget input {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}

.search-widget input:focus {
  background: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
  outline: none;
}

/* ---------- Section headers ---------- */
/* Softer, larger, spaced section titles */
.group-header h2 {
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.75rem !important;
  opacity: 0.75;
  padding-top: 0.75rem;
}

/* ---------- Service cards: glass + hover lift ---------- */
.group-container {
  padding: 0.5rem;
}

/* The card itself */
.service-card {
  border-radius: 1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 8px 24px rgba(2, 6, 23, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.25s ease,
    background 0.25s ease;
  overflow: hidden;
}

html.theme-light .service-card {
  background: rgba(255, 255, 255, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
}

.service-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.13) !important;
  box-shadow:
    0 18px 40px rgba(2, 6, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html.theme-light .service-card:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.14);
}

/* Status dot sits cleanly in the top-right */
.service-status {
  opacity: 0.9;
}

/* Rounded icon container */
.service-icon {
  border-radius: 0.75rem !important;
}

/* Slightly larger, cleaner titles */
.service-titles {
  padding: 0.1rem 0.25rem;
}

.service-title-text {
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

/* Description under title */
.service-description {
  opacity: 0.72;
  margin-top: 0.15rem;
}

/* ---------- Bookmark pills ---------- */
/* For any future bookmarks section */
.bookmarks-container {
  gap: 0.5rem;
}

.bookmark {
  border-radius: 0.75rem !important;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease;
}

.bookmark:hover {
  transform: translateY(-2px);
}

/* ---------- Quick launch / bottom bar ---------- */
.quicklaunch,
.bottom-bar {
  backdrop-filter: blur(10px);
}

/* ---------- Scrollbar (webkit) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.7); }

/* ---------- Fade-in on load ---------- */
@keyframes homepageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.main-content,
.information-widgets {
  animation: homepageFadeIn 0.5s ease both;
}