/* Jindal's Physio Balance — Custom CSS */

/* ── Fonts ─────────────────────────────────────── */
:root {
  --brand-50:  #f5eef2;
  --brand-100: #ede0eb;
  --brand-500: #8b7bc8;
  --brand-600: #7b5ea8;
  --brand-700: #6b4f95;
  --brand-900: #2d1f6e;
}

/* ── Smooth scrolling ──────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ── Fade-in animation ─────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.fade-in-delay.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sidebar Link Styles ───────────────────────── */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #bb91b8;
  transition: all 0.15s ease;
  text-decoration: none;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-link.active {
  background-color: rgba(139, 123, 200, 0.3);
  color: white;
}

/* ── Toast transition ──────────────────────────── */
#flash-success,
#flash-error {
  transition: opacity 0.3s ease;
}

/* ── Form focus ring ───────────────────────────── */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 123, 200, 0.25);
}

/* ── Progress bar animation ────────────────────── */
.progress-bar {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Checkbox custom ───────────────────────────── */
.task-checkbox {
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #d8bfd5;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.task-checkbox:checked {
  background-color: #22c55e;
  border-color: #22c55e;
}

.task-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ── Card hover effects ────────────────────────── */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(139, 123, 200, 0.15);
}

/* ── Scrollbar customization ───────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f5eef2;
}

::-webkit-scrollbar-thumb {
  background-color: #d8bfd5;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #8b7bc8;
}

/* ── Button loading state ──────────────────────── */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ── Star rating hover effect ──────────────────── */
.star-icon {
  cursor: pointer;
  transform: scale(1);
  transition: transform 0.1s ease;
}

.star-icon:hover {
  transform: scale(1.15);
}

/* ── Line clamp utility ────────────────────────── */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Mobile responsive nav fix ─────────────────── */
@media (max-width: 1023px) {
  #sidebar {
    z-index: 40;
  }
}

/* ── Print styles ──────────────────────────────── */
@media print {
  nav, footer, .sidebar-link, button { display: none !important; }
}
