/* =========================================================
   Conjurly WP GeoDirectory Enhancements
   Version: 0.1.1
   Purpose: Conjurly-owned presentation layer for GeoDirectory and related listing UI.
   ========================================================= */

/* Conjurly UI Core — PLUGINS
   Source of truth: plugin file
   Do not hardcode values elsewhere.

   Scope in this version:
   - WP GeoDirectory / WPGD only

   Notes:
   - The Events Calendar experiments were intentionally removed from UI Core.
   - TEC should move into its own dedicated UI plugin after baseline reset.
*/

/* ======================================================
   WP GeoDirectory (WPGD) Overrides
   ====================================================== */

/* Ensure GeoDirectory notices adopt Conjurly alert styling */
.wpgeodirectory .alert,
.geodir-notification,
.geodir-message,
.geodir-alert{
  border-radius: var(--cj-alert-radius);
  border: 1px solid var(--cj-alert-border);
}

/* Map GeoDirectory notice types to Conjurly alert tokens */
.geodir-notification-info,
.geodir-message-info{
  background: var(--cj-alert-info-bg);
  color: var(--cj-alert-info-text);
  border-color: var(--cj-alert-info-border);
}

.geodir-notification-success,
.geodir-message-success{
  background: var(--cj-alert-success-bg);
  color: var(--cj-alert-success-text);
  border-color: var(--cj-alert-success-border);
}

.geodir-notification-warning,
.geodir-message-warning{
  background: var(--cj-alert-warning-bg);
  color: var(--cj-alert-warning-text);
  border-color: var(--cj-alert-warning-border);
}

.geodir-notification-error,
.geodir-message-error{
  background: var(--cj-alert-danger-bg);
  color: var(--cj-alert-danger-text);
  border-color: var(--cj-alert-danger-border);
}

/* GeoDirectory links inside notices */
.wpgeodirectory .alert a,
.geodir-notification a,
.geodir-message a{
  color: var(--cj-accent);
  text-decoration: none;
  font-weight: 600;
}

.wpgeodirectory .alert a:hover,
.geodir-notification a:hover,
.geodir-message a:hover{
  color: var(--cj-accent-hover);
  text-decoration: underline;
}

/* ======================================================
   WP GeoDirectory (BSUI) — override Bootstrap alert vars
   ====================================================== */

/* Base: radius */
.geodir-add-listing.bsui .alert{
  --bs-alert-border-radius: var(--cj-alert-radius) !important;
}

/* INFO */
.geodir-add-listing.bsui .alert.alert-info{
  --bs-alert-bg: var(--cj-alert-info-bg) !important;
  --bs-alert-color: var(--cj-alert-info-text) !important;
  --bs-alert-border-color: var(--cj-alert-info-border) !important;
}

/* SUCCESS */
.geodir-add-listing.bsui .alert.alert-success{
  --bs-alert-bg: var(--cj-alert-success-bg) !important;
  --bs-alert-color: var(--cj-alert-success-text) !important;
  --bs-alert-border-color: var(--cj-alert-success-border) !important;
}

/* WARNING */
.geodir-add-listing.bsui .alert.alert-warning{
  --bs-alert-bg: var(--cj-alert-warning-bg) !important;
  --bs-alert-color: var(--cj-alert-warning-text) !important;
  --bs-alert-border-color: var(--cj-alert-warning-border) !important;
}

/* DANGER */
.geodir-add-listing.bsui .alert.alert-danger{
  --bs-alert-bg: var(--cj-alert-danger-bg) !important;
  --bs-alert-color: var(--cj-alert-danger-text) !important;
  --bs-alert-border-color: var(--cj-alert-danger-border) !important;
}

/* Links inside the alert (if any) */
.geodir-add-listing.bsui .alert a{
  color: var(--cj-accent) !important;
  font-weight: 600;
  text-decoration: none;
}

.geodir-add-listing.bsui .alert a:hover{
  color: var(--cj-accent-hover) !important;
  text-decoration: underline;
}

/* =========================
   GeoDirectory / WPGD (bsui)
   Checkboxes + radios + focus
   ========================= */

/* Unchecked visibility + border consistency (match .bsui .form-control) */
.geodir-add-listing.bsui .form-check-input{
  background-color: #fff !important;
  border: 1px solid #d5d2dc !important;
}

/* Checked state background + border */
.geodir-add-listing.bsui .form-check-input:checked{
  background-color: var(--cj-accent) !important;
  border-color: var(--cj-accent) !important;
}

/* Checkbox tick (white) */
.geodir-add-listing.bsui .form-check-input[type="checkbox"]:checked{
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-7'/%3e%3c/svg%3e") !important;
}

/* Radio dot (white) */
.geodir-add-listing.bsui .form-check-input[type="radio"]:checked{
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e") !important;
}

/* Focus: remove browser outline + use Conjurly ember ring */
.geodir-add-listing.bsui .form-check-input:focus{
  outline: none !important;
  border-color: var(--cj-accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(201, 74, 47, 0.25) !important;
}

/* Ensure radios are circular */
.geodir-add-listing.bsui .form-check-input[type="radio"]{
  border-radius: 50%;
}

/* Checkboxes remain square but soft */
.geodir-add-listing.bsui .form-check-input[type="checkbox"]{
  border-radius: 4px;
}

/* =========================
   WPGD inputs/selects/textarea: Ember focus (kills blue)
   ========================= */
.geodir-add-listing.bsui .form-control:focus,
.geodir-add-listing.bsui .form-select:focus,
.geodir-add-listing.bsui textarea.form-control:focus{
  border-color: var(--cj-accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(201, 74, 47, 0.25) !important;
  outline: none !important;
}
