/* ===========================================================
   Infloowo — brand theme for Bootstrap 5
   Page layout is handled by Bootstrap's grid, flex, and spacing
   utilities in the markup. This file only carries brand colors/
   button theming, plus styling for the opportunity/applicant
   content that js/opportunities.js and js/brand-opportunities.js
   render dynamically into the page.
   =========================================================== */

:root {
  --color-primary: #187c9b;        /* deepened brand blue — passes AA contrast on white */
  --color-primary-hover: #146a85;
  --color-primary-light: #e9f3f6;  /* light tint of brand blue, for chips/highlights */
  --color-logo-blue: #26b3de;      /* true brand blue, decorative use only (logo, large fills) */
  --color-accent: #fd9c2d;         /* true brand orange, decorative use only */
  --color-accent-dark: #cb6c01;    /* darkened orange — safe for text/icons on white */
  --color-accent-light: #fef3e6;   /* light tint of brand orange, for chips/highlights */
  --color-text-muted: #6b6560;
  --color-border: #e5e9eb;
  --color-error: #b91c1c;
  --color-error-bg: #fef2f2;
  --color-success: #15803d;
  --color-success-bg: #f0fdf4;
}

body {
  background-color: #f7f9fa;
}

a {
  color: var(--color-primary);
}
a:hover {
  color: var(--color-primary-hover);
}

/* Brand colors layered onto Bootstrap's CSS-variable-driven components */
.btn-primary {
  --bs-btn-bg: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-bg: var(--color-primary-hover);
  --bs-btn-hover-border-color: var(--color-primary-hover);
  --bs-btn-active-bg: var(--color-primary-hover);
  --bs-btn-active-border-color: var(--color-primary-hover);
  --bs-btn-disabled-bg: var(--color-primary);
  --bs-btn-disabled-border-color: var(--color-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-bg: var(--color-primary);
  --bs-btn-hover-border-color: var(--color-primary);
  --bs-btn-active-bg: var(--color-primary);
  --bs-btn-active-border-color: var(--color-primary);
}

.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Matches Bootstrap's .is-invalid glow color/shape, for the two group
   containers (niches checkboxes, platforms list) that aren't a single
   form control and so can't use .is-invalid directly. */
.invalid-group {
  border-radius: var(--bs-border-radius, 0.375rem);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb, 220, 53, 69), 0.25);
}

/* Content niche checkboxes get a rounded pill backdrop, tinted with the
   light brand color, that encompasses both the checkbox and its label. */
#niches-group .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-primary-light);
  border-radius: 999px;
  padding: 0.375rem 0.9rem 0.375rem 0.75rem;
  margin-bottom: 0;
}
#niches-group .form-check .form-check-input {
  float: none;
  margin-top: 0;
  margin-left: 0;
}

/* Consent box (privacy policy checkbox) — brand-tinted instead of Bootstrap's default grey */
.alert-light {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

/* "Platform" placeholder reads as muted text, like a real placeholder,
   until the user picks an actual platform. */
.form-select:has(option[value=""]:checked) {
  color: var(--color-text-muted);
}

/* Content language(s) tag input — pills + inline autocomplete field
   rendered inside a Bootstrap .form-control look-alike container. */
#languages-control {
  min-height: 2.75rem;
  height: auto;
  cursor: text;
}
#languages-control:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(24, 124, 155, 0.25);
}

#languages-typeahead {
  flex: 1 1 auto;
  min-width: 120px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
}

.language-pill .btn-close {
  font-size: 0.55rem;
}

#languages-dropdown {
  top: 100%;
  left: 0;
  z-index: 1000;
  width: auto;
  min-width: 60%;
  max-width: 100%;
  max-height: 220px;
  overflow-y: auto;
}
#languages-dropdown .list-group-item {
  cursor: pointer;
  white-space: nowrap;
}
#languages-dropdown .list-group-item-action:hover,
#languages-dropdown .list-group-item-action:focus {
  background-color: var(--color-primary-light);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(24, 124, 155, 0.25);
}

/* Accent top borders used on featured cards (audience cards, signup forms) */
.card-accent-blue { border-top: 3px solid var(--color-logo-blue); }
.card-accent-orange { border-top: 3px solid var(--color-accent); }

/* ===========================================================
   Opportunity marketplace — rendered dynamically by
   js/opportunities.js and js/brand-opportunities.js
   =========================================================== */
.opportunity-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 22px 24px;
}
.opportunity-card .opp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.opportunity-card h4 { margin: 0 0 4px; }
.opportunity-card .company { color: var(--color-text-muted); font-size: 0.88rem; margin: 0 0 10px; }
.opportunity-card p.description { margin: 10px 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-open { background: var(--color-success-bg); color: var(--color-success); }
.badge-closed { background: var(--color-border); color: var(--color-text-muted); }

.opp-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.link-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.applicants-panel { margin-top: 14px; border-top: 1px solid var(--color-border); padding-top: 14px; display: none; }
.applicants-panel.open { display: block; }

.applicant-item { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.applicant-item:last-child { border-bottom: none; }
.applicant-item .name { font-weight: 600; }
.applicant-item .meta-line { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 2px; }

.empty-state { color: var(--color-text-muted); font-size: 0.92rem; padding: 24px 0; }
