/* ============================================================
   COUNTRY PICKER — shared across all pages with phone fields
   Use: <div class="country-picker" data-cp> ... </div>
   See country-picker.js for the matching markup template.
   ============================================================ */

.country-picker { position: relative; display: flex; }

.country-trigger {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.8);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 0 12px; cursor: pointer; user-select: none;
  white-space: nowrap; min-width: 90px;
  transition: border-color 0.2s;
  /* Match height of adjacent input via stretch on the parent flex container */
  width: 100%; flex: 1;
  line-height: 1;
}
.country-trigger:hover { border-color: rgba(255,255,255,0.3); }
.country-trigger svg { width: 10px; height: 10px; fill: rgba(255,255,255,0.35); flex-shrink: 0; }

.country-dropdown {
  position: absolute; top: calc(100% + 2px); left: 0; z-index: 200;
  background: #1a3060;
  border: 1px solid rgba(255,255,255,0.15);
  min-width: 220px; display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  flex-direction: column;
}
.country-dropdown.open { display: flex; }

.cp-search-wrap {
  padding: 8px 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cp-search {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 12px;
  padding: 7px 10px; outline: none;
}
.cp-search::placeholder { color: rgba(255,255,255,0.3); }

.cp-list { max-height: 200px; overflow-y: auto; }
.cp-list::-webkit-scrollbar { width: 4px; }
.cp-list::-webkit-scrollbar-track { background: transparent; }
.cp-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.country-option {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; cursor: pointer;
  font-size: 13px; color: rgba(255,255,255,0.75);
  transition: background 0.15s;
  white-space: nowrap;
}
.country-option:hover { background: rgba(255,255,255,0.07); color: #fff; }
.country-option.selected { background: rgba(192,172,133,0.1); color: var(--gold, #c0ac85); }
.country-option.hidden { display: none; }

.country-flag { font-size: 15px; line-height: 1; flex-shrink: 0; }

.cp-no-results {
  display: none; padding: 12px; font-size: 12px;
  color: rgba(255,255,255,0.4); text-align: center;
}

/* Light theme variant for forms on white backgrounds.
   Apply class .country-picker--light to the wrapper. */
.country-picker--light .country-trigger {
  background: #fff;
  border: 1px solid rgba(18,51,104,0.2);
  color: var(--text-dark, #123368);
}
.country-picker--light .country-trigger svg { fill: rgba(18,51,104,0.4); }
.country-picker--light .country-dropdown {
  background: #fff;
  border: 1px solid rgba(18,51,104,0.15);
  box-shadow: 0 8px 32px rgba(18,51,104,0.15);
}
.country-picker--light .cp-search-wrap { border-bottom-color: rgba(18,51,104,0.08); }
.country-picker--light .cp-search {
  background: var(--off-white, #f3f4f6);
  border: 1px solid rgba(18,51,104,0.15);
  color: var(--text-dark, #123368);
}
.country-picker--light .cp-search::placeholder { color: rgba(18,51,104,0.4); }
.country-picker--light .country-option { color: var(--text-mid, #4a5568); }
.country-picker--light .country-option:hover { background: var(--off-white, #f3f4f6); color: var(--navy, #123368); }
.country-picker--light .country-option.selected { background: rgba(0,74,195,0.06); color: var(--blue, #004ac3); }
.country-picker--light .cp-list::-webkit-scrollbar-thumb { background: rgba(18,51,104,0.2); }
