/*=============================================
  OPPORTUNITIES — LIST PAGE (light)
=============================================*/
.opps-page {
  font-family: 'Poppins', sans-serif;
  padding: 0.81rem;
  color: #1a1a1a;
}

.opps-header {
  margin-bottom: 1.5rem;
}

.opps-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}

.opps-subtitle {
  font-size: 0.8rem;
  color: #666;
  margin: 0.35rem 0 0 0;
}

/*---------------------------------------------
  Category Tabs
---------------------------------------------*/
.opps-tabs {
  display: inline-flex;
  background: #f2f2f4;
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.15rem;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.opps-tab {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  transition: all 0.2s ease;
}

.opps-tab:hover:not(.active) { color: #000; }

.opps-tab.active {
  background: #1d1d1f;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/*---------------------------------------------
  Filters
---------------------------------------------*/
.opps-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.opps-select {
  padding: 0.6rem 2.4rem 0.6rem 0.9rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  background: #fff;
  color: #333;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.opps-select:hover { border-color: #c8c8c8; }
.opps-select:focus {
  outline: none;
  border-color: #1d1d1f;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.opps-search {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  padding: 0.6rem 0.9rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.opps-search:focus {
  outline: none;
  border-color: #1d1d1f;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.opps-search::placeholder { color: #a5a5a5; }

/*---------------------------------------------
  Opportunity Rows
---------------------------------------------*/
.opps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.opp-card {
  position: relative;
}

.opp-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.2rem 1.4rem;
  padding-right: 3.2rem;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 0.81rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.opp-row:hover {
  border-color: #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.opp-row__icon {
  width: 3.8rem;
  height: 3.8rem;
  flex-shrink: 0;
  border-radius: 0.7rem;
  object-fit: contain;
}

.opp-row__icon.is-broken {
  visibility: hidden;
}

.opp-row__main { flex: 1; min-width: 0; }

.opp-row__titles {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.opp-row__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  margin: 0;
  letter-spacing: -0.01em;
}

.opp-row__org {
  font-size: 0.72rem;
  color: #555;
  font-weight: 600;
}

.opp-row__desc {
  font-size: 0.72rem;
  color: #555;
  margin: 0.4rem 0 0 0;
  line-height: 1.5;
}

.opp-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.opp-row__pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.opp-row__date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: #6a6a72;
  background: #f6f6f8;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.opp-row__date i {
  font-size: 0.6rem;
  opacity: 0.7;
}

.opp-row__date--rolling {
  color: #5a7a5f;
  background: #eef5ef;
}

.opp-row__chevron {
  position: absolute;
  right: 1.3rem;
  bottom: 1.2rem;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background-color: #c2c2c2;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.opp-row:hover .opp-row__chevron {
  transform: translateX(3px);
  background-color: #000;
}

.opps-empty {
  font-size: 0.8rem;
  color: #666;
  padding: 2rem;
  text-align: center;
  background: #fafafa;
  border: 1px dashed #e0e0e0;
  border-radius: 0.81rem;
}

/*---------------------------------------------
  Pills — light surface
---------------------------------------------*/
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.pill--open {
  background: #e8f5e9;
  color: #2e7d32;
}

.pill--upcoming {
  background: #fff3cd;
  color: #856404;
}

.pill--closed {
  background: #f2f2f4;
  color: #777;
}

.pill--closing {
  background: #fdeef0;
  color: #c0392b;
}

.pill--type {
  background: #ecebe8;
  color: #514c46;
}

/*---------------------------------------------
  Favourites
---------------------------------------------*/
.opp-fav {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #c4c4c8;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.opp-fav:hover {
  background: rgba(29, 29, 31, 0.05);
  color: #1d1d1f;
}

.opp-fav:active {
  transform: scale(0.9);
}

.opp-fav.is-fav {
  color: #e0a800;
}

.opp-fav.is-fav:hover {
  color: #c99400;
}

/* Favourites filter toggle */
.opps-fav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid #f0d98a;
  border-radius: 0.5rem;
  background: #fffdf5;
  color: #8a6d0f;
  font-size: 0.7rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.opps-fav-toggle i { color: #e0a800; }

.opps-fav-toggle:hover {
  border-color: #e0a800;
  background: #fff9e6;
}

.opps-fav-toggle.active {
  border-color: #e0a800;
  background: #fff3c9;
  color: #6f5709;
}

.opps-fav-toggle.active i { color: #d09600; }

.opps-fav-toggle input { display: none; }

/*=============================================
  SLIDE-IN DETAIL PANEL (dark)
=============================================*/
.opp-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10000;
}

.opp-panel-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.opp-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 92vw);
  background:
    radial-gradient(circle 500px at 85% 4%, rgba(195, 214, 209, 0.22), transparent 70%),
    linear-gradient(160deg, #2b3a3d 0%, #2a3134 45%, #2c2e30 100%);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.3, 1);
  z-index: 10001;
  overflow-y: auto;
  scrollbar-width: none;
}

.opp-panel::-webkit-scrollbar {
  display: none;
}

.opp-panel.is-open {
  transform: translateX(0);
}

.opp-panel__close {
  position: sticky;
  top: 1rem;
  margin-left: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, transform 0.15s ease;
}

.opp-panel__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.06);
}

.opp-panel__body {
  padding: 0.5rem 2.2rem 2.5rem;
}

.opp-panel__loading {
  display: flex;
  justify-content: center;
  padding: 5rem 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.4rem;
}

.opp-panel__error {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  text-align: center;
  padding: 3rem 0;
}
/*=============================================
  DETAIL CONTENT (shared: panel + standalone)
=============================================*/
.opp-detail {
  font-family: 'Poppins', sans-serif;
  color: #fff;
}

/* Panel view: clear the sticky close button so pills don't sit under it */
.opp-panel .opp-detail {
  padding-top: 3.5rem;
}

/* Standalone page gets the dark bg + width constraint */
body.page-opp-detail {
  background:
    radial-gradient(circle 760px at 80% 6%, rgba(195, 214, 209, 0.30), rgba(195, 214, 209, 0.11) 44%, transparent 74%),
    linear-gradient(160deg, #2b3a3d 0%, #2a3134 40%, #2c2e30 70%, #303236 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.page-opp-detail .main-content,
body.page-opp-detail .content-area {
  background: transparent;
}

body.page-opp-detail .opp-detail {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.opp-detail__pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.opp-detail__title {
  font-family: 'Vinila', 'Poppins', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.opp-detail__org {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0.4rem 0 1.75rem 0;
  font-weight: 500;
}

/*---------------------------------------------
  Key Dates
---------------------------------------------*/
.opp-detail__dates {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.date-block {
  flex: 1;
  min-width: 130px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.81rem;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.date-block__label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.date-block__value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

/*---------------------------------------------
  Sections
---------------------------------------------*/
.opp-detail__section {
  margin-bottom: 1.5rem;
}

.opp-detail__heading {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.opp-detail__text {
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

/*---------------------------------------------
  Previous Rounds
---------------------------------------------*/
.opp-detail__history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.opp-detail__history li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
}

.opp-detail__history li:last-child { border-bottom: none; }

.history-label {
  font-weight: 600;
  color: #fff;
}

.history-dates {
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

/*---------------------------------------------
  Pills — dark surface
---------------------------------------------*/
.pill--dark-open {
  background: rgba(93, 211, 98, 0.18);
  color: #5dd362;
}

.pill--dark-upcoming {
  background: rgba(245, 217, 130, 0.16);
  color: #f5d982;
}

.pill--dark-closed {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.pill--dark-closing {
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
}

.pill--dark-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
}

/*---------------------------------------------
  CTA
---------------------------------------------*/
.opp-detail__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding: 0.9rem 1.6rem;
  background: #fff;
  color: #0a0a0a;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: background 0.25s ease, transform 0.15s ease;
}

.opp-detail__cta:hover {
  background: rgb(226, 254, 169);
  color: #0a0a0a;
}

.opp-detail__cta:active { transform: scale(0.97); }

.opp-detail__cta i {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.opp-detail__cta:hover i { transform: translate(2px, -2px); }

/*=============================================
  MEDIA QUERIES
=============================================*/
@media (max-width: 900px) {
  .opp-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-right: 1.4rem;
  }

  .opp-row__meta {
    align-items: flex-start;
  }

  .opp-row__pills {
    justify-content: flex-start;
  }

  .opp-row__chevron { display: none; }
}

@media (max-width: 600px) {
  .opps-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .opps-tab {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.5rem;
  }

  .opps-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .opps-select,
  .opps-search {
    width: 100%;
    max-width: none;
  }

  .opps-fav-toggle {
    width: 100%;
    justify-content: center;
  }

  .opp-panel {
    width: 100vw;
  }

  .opp-panel__body {
    padding: 0.5rem 1.25rem 2rem;
  }

  .opp-detail__title { font-size: 1.35rem; }

  .opp-detail__dates { flex-direction: column; }

  .date-block { min-width: 0; }

  body.page-opp-detail .opp-detail {
    padding: 1rem 0.5rem;
  }
}