/* ==============================
   Performance Calendar — Two-row Mobile Cards
   ============================== */

:root {
  --pc-primary: #583948;
  --pc-primary-600: #4b303d;
  --pc-ink: #1c1b1b;
  --pc-muted-ink: rgba(0, 0, 0, 0.6);
  --pc-grid: rgba(88, 57, 72, 0.25);
}

/* Toolbar */
.fc .fc-toolbar-title {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.fc .fc-button {
  background: var(--pc-primary);
  border: 0;
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05) inset;
}
.fc .fc-button:hover {
  filter: brightness(0.95);
}
.fc .fc-button:focus {
  outline: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

/* Grid lines */
.fc-theme-standard td,
.fc-theme-standard th {
  border-color: var(--pc-grid);
}

/* Event cards */
.fc .fc-daygrid-event {
  background: var(--pc-primary);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 4px 6px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: normal;
  text-align: left;
}

/* ==============================
   List View Styling
   ============================== */

.fc .fc-list-event {
  margin: 10px 0;
}
.fc .fc-list-event td {
  padding: 0 !important;
  background: transparent;
  border: 0;
}
.fc .fc-list-event-title {
  width: 100%;
  padding: 0 !important;
}
.fc .fc-list-event-title > .pc-list-row {
  width: 100%; /* 🔥 fill the whole row */
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: var(--pc-primary);
  color: #fff;
  border-radius: 12px;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-sizing: border-box;
}

/* Optional breathing room between list rows */
.fc .fc-list-table {
  border-collapse: separate;
  border-spacing: 0 6px;
}

/* Inside the card */
.pc-list-row .pc-list-image {
  flex: 0 0 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
}
.pc-list-row .pc-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pc-list-row .pc-list-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pc-list-row .pc-list-title {
  font-weight: 700;
  margin-bottom: 4px;
}
.pc-list-row .pc-list-meta {
  font-size: 0.8rem;
  opacity: 0.9;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==============================
   Mobile adjustments
   ============================== */
@media (max-width: 520px) {
  .fc .fc-toolbar-title {
    font-size: 1.1rem;
  }
  .pc-list-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .pc-list-row .pc-list-image {
    width: 100%;
    height: 160px;
    margin-bottom: 8px;
  }
}
.fc-list-event-time {
  display: none !important;
}
/* ===== Modal overlay (popup) ===== */
#pc-modal {
  position: fixed; /* make it an overlay */
  inset: 0; /* top/right/bottom/left: 0 */
  display: none; /* shown via JS: display:flex */
  align-items: center; /* center the dialog */
  justify-content: center;
  padding: 16px; /* breathing room around the dialog */
  background: rgba(0, 0, 0, 0.5); /* backdrop */
  z-index: 2147483647; /* above FullCalendar and theme */
  box-sizing: border-box;
}

#pc-modal .pc-modal-inner {
  width: 100%;
  max-width: min(720px, 96vw);
  background: #fff;
  color: #1c1b1b;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  padding: 16px;
  position: relative;
}

#pc-modal .pc-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

#pc-modal .pc-modal-thumb {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin-bottom: 12px;
}

/* Optional: make the buy section look consistent without touching layout */

/* ----- Modal actions layout ----- */
#pc-modal .pc-modal-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#pc-modal .pc-qty-wrap {
  display: flex;
  align-items: center;
  font-weight: 500;
}

#pc-modal .pc-qty-wrap .pc-qty {
  width: 90px;
  margin-left: 8px;
}

/* Red sa akcijama (buy + delete) */
#pc-modal .pc-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Gurne delete dugme skroz desno */
#pc-modal .pc-actions-row .pc-btn-delete {
  margin-left: auto;
}

/* ----- Unifikovan stil dugmadi (kao FullCalendar dugme) ----- */
.pc-btn {
  border: 0;
  color: #fff;
  border-radius: 10px; /* kao .fc-button */
  padding: 6px 10px; /* kao .fc-button */
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05) inset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: filter 0.15s ease, transform 0.02s ease;
}

.pc-btn:hover {
  filter: brightness(0.95);
}
.pc-btn:active {
  transform: translateY(1px);
}
.pc-btn:focus-visible {
  outline: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}
.pc-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Boje */
.pc-btn-buy {
  background: var(--pc-primary);
}
.pc-btn-delete {
  background: #cc2b2b;
} /* crveno ostaje */
#pc-modal .pc-qty-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

#pc-modal .pc-qty-wrap .pc-qty {
  width: 90px;
  margin-left: 8px;
}

#pc-modal .pc-qty-cap {
  opacity: 0.65;
  font-weight: 600;
}
/* Keep modal content within viewport on all devices */
#pc-modal .pc-modal-inner {
  max-height: 90vh; /* never exceed viewport height */
  overflow: auto; /* scroll inside if content gets tall */
}

/* Make the image responsive and never too tall */
#pc-modal .pc-modal-thumb {
  max-height: 32vh; /* adjust to taste (25–35vh works well) */
  width: 100%;
  height: auto;
  object-fit: cover; /* crop gently if too tall */
}

/* Quantity row: inline with the "/ {max}" suffix */
.pc-qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.pc-qty-wrap .pc-qty {
  width: 90px; /* matches your previous sizing */
  margin-left: 8px;
}

.pc-qty-cap {
  opacity: 0.8;
}
