/* =================================================
   Base layout
================================================= */
:root {
  --main: #191c1a;
  --tableheader: #0e0f0f;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f1115;
  color: #e5e7eb;
}

.page {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 1.5rem;
}

h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #f9fafb;
}

/* =================================================
   FullCalendar container & toolbar
================================================= */
.fc {
  background: #141820;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

.fc-toolbar-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f3f4f6;
}

.fc-button {
  background: #1f2937;
  border: 1px solid #2a2f3a;
  color: #e5e7eb;
  border-radius: 8px;
  padding: .4rem .75rem;
  font-size: .85rem;
  transition: background .15s, border-color .15s;
}

.fc-button:hover {
  background: #27313f;
  border-color: #3a3f4b;
}

.fc-button-primary:not(:disabled).fc-button-active {
  background: #16a34a;
  border-color: #16a34a;
  color: #022c22;
}

/* =================================================
   Grid & cells
================================================= */
.fc-theme-standard td,
.fc-theme-standard th,
.fc-scrollgrid-sync-inner {
  border-color: #242833;
  background-color: var(--tableheader);
}

.fc-col-header-cell-cushion {
  color: #9ca3af;
  font-weight: 500;
}

.fc-daygrid-day-number {
  color: #9ca3af;
  font-size: .85rem;
}

.fc-day-today {
  background: rgba(22,163,74,.08)!important;
}

.fc-daygrid-day-frame {
  background: var(--main);
}

/* =================================================
   Event base styling (shared)
================================================= */
.fc-daygrid-event,
.fc-timegrid-event,
.fc-event.fc-event-allday {
  background: linear-gradient(135deg,#1f3a34,#2f6f4e,#7bbf5a);
  background-size: 200% 200%;
  animation: softGradientShift 14s ease infinite;
  border: none;
  border-radius: 8px;
  color: #ecfdf5;
  position: relative;
  background-clip: padding-box;
}

.fc-daygrid-event::before,
.fc-timegrid-event::before,
.fc-event.fc-event-allday::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(163,230,53,.45),
    rgba(47,111,78,.45)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.fc-daygrid-event {
  padding: 2px 6px;
  font-size: .75rem;
  font-weight: 500;
}

.fc-timegrid-event {
  font-size: .8rem;
}

.fc-daygrid-event:hover,
.fc-timegrid-event:hover {
  filter: brightness(1.08);
}

/* =================================================
   List & popover
================================================= */
.fc-list {
  border: none;
}

.fc-list-day-cushion {
  background: var(--main);
  color: #9ca3af;
}

.fc-list-event {
  background: #141820;
}

.fc-list-event:hover td {
  background: #1f2937;
}

.fc-popover {
  background: #141820;
  border: 1px solid #2a2f3a;
  border-radius: 10px;
  color: #e5e7eb;
}

.fc-popover-header {
  background: #1f2937;
  border-bottom: 1px solid #2a2f3a;
}

/* =================================================
   Now indicator
================================================= */
.fc-timegrid-now-indicator-line {
  border-top: 2px solid #ef4444;
}

.fc-timegrid-now-indicator-arrow {
  border-color: #ef4444;
}

/* =================================================
   Modal
================================================= */
#availability-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: #141820;
  border-radius: 16px;
  padding: 2rem;
  width: 360px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,.45);
  animation: modalIn .25s ease-out;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

/* FIX modal stacking */
#availability-modal {
  pointer-events: none;
}

#availability-modal .modal,
#availability-modal .modal-backdrop {
  pointer-events: auto;
}

.modal-backdrop {
  z-index: 1;
}

.modal {
  position: relative;
  z-index: 2;
}


/* Primary modal action */
.modal-action {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: linear-gradient(
    135deg,
    rgba(163,230,53,0.9),
    rgba(34,197,94,0.9)
  );
  color: #022c22;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}

.modal-action:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Close (X) button */
.modal-close {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: #9ca3af;
  font-size: 1.25rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.12);
  color: #f9fafb;
}

/* =================================================
   Spotify card (single source of truth)
================================================= */

.spotify-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: #141820;
  color: #e5e7eb;
  text-decoration: none;
  overflow: hidden;
}

/* Animated border */
.spotify-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(163,230,53,0.55),
    rgba(34,197,94,0.45),
    rgba(163,230,53,0.55)
  );
  background-size: 200% 200%;
  animation: softGradientShift 12s ease infinite;

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Slight hover polish */
.spotify-card:hover {
  filter: brightness(1.05);
}


.spotify-card img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
}

.spotify-info strong {
  font-size: .9rem;
  color: #ecfdf5;
}

.spotify-info span {
  font-size: .75rem;
  color: #9ca3af;
}

.spotify-open {
  color: #1db954;
  font-size: 1.4rem;
}

.card > h3 + div {
    margin-bottom: 0.25rem !important; /* Slightly reduce the bottom margin below the link area */
    margin-top: -0.25rem; /* PULL IT UP a little bit */
}

/* Ensure the h3 doesn't have a massive margin below it */
.card h3 {
    margin-bottom: 0.25rem; /* Adjust if needed to control header space */
}

.spotify-live-pill {
	display: none;
}

.spotify-loading-card {
    /* Base Card Styling (borrowed from .spotify-card) */
    display: flex;
    align-items: center;
    justify-content: center; /* Center content horizontally */
    gap: 0.55rem;
    height: 64px; /* Set a fixed height similar to the track card (56px img + padding) */
    border-radius: 14px;
    background: #141820; /* Use your existing card background color */
    color: #9ca3af; /* Muted text color */
    font-size: 0.9rem;
    
    /* Ensure no text wrap */
    white-space: nowrap;
    overflow: hidden;

    /* Optional: Add a simple border if you like a cleaner look */
    border: 1px solid #2a2f3a; 
}

/* Style the Font Awesome Spinner */
.spotify-loading-card i {
    font-size: 1.4rem; /* Make the spinner a decent size */
    color: #1db954; /* Use Spotify green for the spinner */
}

h3 {
   color: #1db954;
}

hr {
	border-color: #1d4025;

}
/* =================================================
   Skeleton loader
================================================= */
.spotify-skeleton {
  display: flex;
  gap: .75rem;
}

.skel-cover,
.skel-line {
  background: linear-gradient(90deg,#1f2937,#2a2f3a,#1f2937);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

/* =================================================
   Dashboard layout
================================================= */
.dashboard {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =================================================
   Responsive
================================================= */
@media (max-width: 768px) {
  .page { padding: .5rem; }
  .dashboard { grid-template-columns: 1fr; }
  .calendar-wrapper { order: -1; }
  .fc-toolbar { flex-direction: column; gap: .5rem; }
}

/* =================================================
   Animations
================================================= */
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}

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

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