/* ===================================================================
   LEEFHub – Core UI Components
   Shared building blocks across ALL frontend modules
=================================================================== */


/* ===================================================================
   1. CARDS
=================================================================== */
.leefhub-card {
  background: var(--lh-surface);
  border: 1px solid var(--lh-border);
  border-radius: 12px;
  padding: 20px;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.leefhub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.leefhub-card-body {
  padding: 0; /* children should control spacing */
}

.leefhub-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}



/* ===================================================================
   2. BUTTONS
=================================================================== */
.leefhub-btn,
.leefhub-button,
.button-primary,
.leefhub-btn-primary,
.button.small {
  background: var(--lh-primary);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.15s;
}

.leefhub-btn:hover,
.leefhub-button:hover,
.button-primary:hover,
.leefhub-btn-primary:hover {
  background: var(--lh-primary-hover);
  transform: translateY(-1px);
}

/* Secondary button */
.leefhub-btn-secondary,
.button-secondary {
  background: transparent;
  border: 2px solid var(--lh-primary);
  color: var(--lh-primary) !important;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
}

.leefhub-btn-secondary:hover,
.button-secondary:hover {
  background: var(--lh-primary);
  color: #fff !important;
}



/* ===================================================================
   3. INPUTS & FORM CONTROLS
=================================================================== */
.leefhub-input,
.leefhub-card input,
.leefhub-card select,
.leefhub-card textarea,
input.leefhub-input,
select.leefhub-input,
textarea.leefhub-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--lh-border);
  background: var(--lh-bg);
  box-sizing: border-box;
  font-size: 1rem;
}

.leefhub-card input:focus,
.leefhub-card select:focus,
.leefhub-card textarea:focus,
.leefhub-input:focus {
  border-color: var(--lh-primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--lh-primary-hover)33;
}



/* ===================================================================
   3B. CUSTOM SELECT (Enhanced Dropdown)
=================================================================== */
.leefhub-select-wrapper {
  position: relative;
  width: 100%;
  display: inline-block;
}

.leefhub-select {
  appearance: none;
  width: 100%;
  padding: 12px 42px 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--lh-border);
  background: var(--lh-bg);
  font-size: 1rem;
  color: var(--lh-text);
  transition: border-color .2s ease, box-shadow .2s ease;
  box-sizing: border-box;
}

.leefhub-select:hover {
  border-color: var(--lh-primary);
}

.leefhub-select:focus {
  border-color: var(--lh-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--lh-primary-hover)33;
}

.leefhub-select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--lh-text-muted);
  font-size: 1.1rem;
}



/* ===================================================================
   4. LISTS & DIVIDERS
=================================================================== */
.leefhub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.leefhub-list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--lh-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.leefhub-list-item:last-child {
  border-bottom: none;
}

.leefhub-divider,
hr.leefhub-divider {
  border: 0;
  border-top: 1px solid var(--lh-border);
  margin: 18px 0;
}



/* ===================================================================
   5. ALERTS
=================================================================== */
.leefhub-alert {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 12px 0;
  color: #856404;
}

.leefhub-alert a {
  color: #856404;
  font-weight: bold;
}



/* ===================================================================
   6. BADGES
=================================================================== */
.leefhub-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
  color: #fff;
}

.leefhub-status-confirmed { background: var(--lh-success); }
.leefhub-status-pending   { background: var(--lh-warning); }
.leefhub-status-cancelled { background: var(--lh-danger); }
.leefhub-badge-inactive   { background: var(--lh-muted); }



/* ===================================================================
   7. GRID HELPERS
=================================================================== */
.leefhub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .leefhub-grid {
    grid-template-columns: 1fr;
  }
}

.leefhub-grid-75-25 {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 28px;
}

@media (max-width: 768px) {
  .leefhub-grid-75-25 {
    grid-template-columns: 1fr;
  }
}

.leefhub-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 768px) {
  .leefhub-grid-2col {
    grid-template-columns: 1fr;
  }
}



/* ===================================================================
   8. UTILITIES
=================================================================== */
.lh-text-muted {
  color: var(--lh-text-muted);
}

.lh-flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lh-hidden {
  display: none !important;
}

.lh-center {
  text-align: center;
}


/* ===================================================================
   SAFE RESET
=================================================================== */
.leefhub-card {
  background: var(--lh-surface);
  border: 1px solid var(--lh-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.leefhub-btn {
  color: var(--lh-text-contrast) !important;
  background: var(--lh-primary);
}

.leefhub-btn.small {
  padding: 7px 14px;
  font-size: 0.85rem;
}

/* Ensure leefhub-container never exceeds device width */
.wp-site-blocks .leefhub-container,
.wp-site-blocks .leefhub-media-collections,
.wp-site-blocks .leefhub-media-gallery,
.wp-site-blocks .leefhub-media-programs,
.wp-site-blocks .leefhub-single-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

