/*
 * Styles for FF Offers Calendar.
 * These styles integrate with the existing Panel Klienta theme (ffc-*) but
 * use their own prefix (ff-of-*) to avoid collisions. Colours and spacing
 * are inspired by the gold/black branding used elsewhere in FF BAR GROUP.
 */

/* Card container inherits base panel card styles via .ffc-card; we add a
   modifier class for calendar specific spacing */
#sec-oferty-calendar.ff-of-card {
  margin: 12px 0;
  padding: 20px;
}

/* Calendar container */
.ff-of-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Toolbar */
.ff-of-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ff-of-btn {
  padding: .32rem .6rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  font-size: .92rem;
  line-height: 1.3;
  color: #111827;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.ff-of-btn:hover {
  border-color: #d1d5db;
  background: #fafafa;
}
.ff-of-btn:focus-visible {
  outline: 2px solid #94c5ff;
  outline-offset: 2px;
}

/* Month label */
.ff-of-month-label {
  flex: 1;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

/* Calendar grid */
.ff-of-calendar {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ff-of-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: .75rem;
  text-align: center;
  color: var(--muted, #6b7280);
}
.ff-of-head-cell {
  padding: .2rem 0;
}
.ff-of-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(60px, auto);
  gap: 2px;
}
.ff-of-day {
  position: relative;
  min-height: 60px;
  border: 1px solid var(--line, #e5e7eb);
  background: #fff;
  padding: 2px;
  display: flex;
  flex-direction: column;
  cursor: default;
}
.ff-of-day.is-other-month {
  background: #f9fafb;
  color: #9ca3af;
}
.ff-of-day.is-today {
  border: 2px solid var(--ff-gold, #CCA352);
  border-radius: 8px;
}
.ff-of-num {
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.ff-of-events {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  font-size: .64rem;
}
.ff-of-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.ff-of-count {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
}
.ff-of-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: .15rem .4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .65rem;
  line-height: 1;
  user-select: none;
  cursor: default;
}
.ff-of-more-ind {
  font-weight: 700;
  cursor: pointer;
  padding: 0 .2rem;
}

/* List & filters */
.ff-of-list-wrapper {
  margin-top: 8px;
  border-top: 1px solid var(--line, #e5e7eb);
  padding-top: 8px;
}
.ff-of-list-summary {
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  padding-right: 1.2rem;
}
.ff-of-list-summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 0;
  transform: translateY(15%);
}
.ff-of-list-wrapper[open] .ff-of-list-summary::after {
  content: '▴';
}
.ff-of-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.ff-of-filter {
  flex: 1 1 auto;
  min-width: 100px;
  padding: .35rem .5rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  background: #fff;
  font-size: .85rem;
}
.ff-of-filter-search {
  flex: 2 1 200px;
}
.ff-of-list-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.ff-of-meta {
  font-size: .8rem;
  color: var(--muted, #6b7280);
  margin-bottom: 4px;
}
.ff-of-link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ff-of-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  padding: 6px 0;
}
.ff-of-link-row a {
  color: #1f2937;
  font-weight: 600;
  text-decoration: underline;
}
.ff-of-link-row a:hover {
  text-decoration: none;
}
.ff-of-link-meta {
  color: var(--muted, #6b7280);
  font-size: .8rem;
}
.ff-of-status {
  margin-left: auto;
  font-size: .7rem;
  padding: .15rem .4rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
}
.ff-of-more {
  margin-top: 8px;
  padding: .4rem .8rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  font-size: .85rem;
  cursor: pointer;
}
.ff-of-more:disabled {
  opacity: .5;
  cursor: not-allowed;
}