/* ============================================================================
   assets/css/opportunities.css - opportunities list (opportunities.php) and detail page (opportunity.php)  (Dev 11)
   Only CSS variables from app.css (no hard-coded colours). Loaded through layout_header 'css'.
   The detail page also uses the .pf-* helpers from profile.css (pf-title, pf-info, pf-ico, pf-side).
   Class names match includes/opportunities.php (opp_card_html / opp_deadline_html).
   ========================================================================== */

/* ---------- list grid + card ---------- */
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
@media (max-width: 575.98px) { .op-grid { grid-template-columns: minmax(0, 1fr); gap: .75rem; } }

.op-card { display: flex; flex-direction: column; gap: .6rem; height: 100%; padding: 1rem; transition: transform .15s ease, box-shadow .15s ease; }
.op-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.op-card.is-muted { opacity: .8; }
.op-card.is-muted .op-title a { color: var(--c-text-muted) !important; }

.op-head { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.op-head > .min-w-0 { min-width: 0; }
.op-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: var(--radius-sm);
  font-size: 1.15rem; background: var(--c-primary-soft); color: var(--c-primary); }
.op-icon.op-tone-success { background: var(--c-accent-soft); color: var(--c-accent); }
.op-icon.op-tone-warning { background: var(--c-warning-soft); color: var(--c-warning); }
.op-icon.op-tone-info { background: var(--c-info-soft); color: var(--c-info); }
.op-icon.op-tone-secondary { background: var(--c-surface-2); color: var(--c-text-muted); }
.op-icon.lg { width: 60px; height: 60px; font-size: 1.6rem; }

.op-title { font-size: 1.05rem; font-weight: 700; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.op-title a { text-decoration: none; }
.op-org { font-size: .85rem; color: var(--c-text-muted); overflow-wrap: anywhere; }
.op-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.op-excerpt { margin: 0; color: var(--c-text-muted); font-size: .9rem; overflow-wrap: anywhere; }
.op-foot { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--c-border); font-size: .8rem; color: var(--c-text-muted); }
.op-foot i, .op-deadline i { margin-right: .35rem; color: var(--c-accent); }
.op-deadline { display: inline-flex; align-items: center; }
.op-deadline.is-soon { color: var(--c-warning); font-weight: 600; }
.op-deadline.is-soon i { color: var(--c-warning); }
.op-deadline.is-over { color: var(--c-danger); }
.op-deadline.is-over i { color: var(--c-danger); }

/* ---------- detail page ---------- */
.op-hero { padding: 1.25rem; }
.op-hero-top { display: flex; align-items: flex-start; gap: 1rem; }
.op-hero-top > .min-w-0 { min-width: 0; }
.op-h1 { font-size: clamp(1.3rem, 3.2vw, 1.8rem); margin: 0 0 .25rem; overflow-wrap: anywhere; }
.op-description { overflow-wrap: anywhere; line-height: 1.7; }
.op-apply { border: 1px dashed var(--c-border); border-radius: var(--radius-sm); padding: .85rem 1rem; background: var(--c-surface-2); overflow-wrap: anywhere; }
.op-apply-value { font-weight: 600; font-size: 1.05rem; }
@media (max-width: 575.98px) { .op-hero { padding: 1rem; } .op-hero-top { flex-direction: column; } }

/* ---------- create / edit modal ---------- */
#oppModal .modal-body { max-height: calc(100vh - 8rem); overflow-y: auto; }
