/* ============================================================
   Biblical Communities — Member Area Styles
   ============================================================ */

/* ── Member Nav Bar ───────────────────────────────────────── */
.member-nav {
  background: #0c130e;
  border-bottom: 2px solid #2a4a30;
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.member-nav .nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.member-nav .logo {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #7de8ad;
  text-decoration: none;
  letter-spacing: .3px;
}
.member-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.member-nav .nav-links a {
  font-family: 'Segoe UI', sans-serif;
  color: #b0cdb8;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: color .2s;
}
.member-nav .nav-links a:hover { color: #3ac779; }
.member-nav .nav-links .logout { color: #e07070; }
.member-nav .nav-links .logout:hover { color: #f09090; }

/* ── Layout wrapper ───────────────────────────────────────── */
.member-wrapper {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ── Page header inside member area ──────────────────────── */
.member-header {
  margin-bottom: 1.6rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.member-header h1 {
  font-size: 1.75rem;
  color: #d4ede0;
  margin: 0;
}
.member-header h2 {
  font-size: 1.35rem;
  color: #b8dcc8;
  margin: 0;
}

/* ── Dashboard welcome card ───────────────────────────────── */
.member-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  padding: 1.8rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 14px rgba(0,0,0,.3);
  color: #d4ede0;
  text-align: center;
  line-height: 1.7;
}
.member-card p { margin-bottom: .8rem; }
.member-card strong { color: #7de8ad; }

/* ── Dashboard tile grid ──────────────────────────────────── */
.dashboard-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.1rem;
}
.dashboard-tile {
  background: #1a2a1e;
  border: 1px solid #2a4030;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: #c8e6d4;
  font-family: 'Segoe UI', sans-serif;
  transition: background .2s, transform .18s, box-shadow .2s;
  box-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.dashboard-tile:hover {
  background: #223a28;
  transform: translateY(-3px);
  box-shadow: 0 4px 18px rgba(0,0,0,.45);
  text-decoration: none;
  color: #e0f5e8;
}
.tile-icon  { font-size: 2rem; display: block; margin-bottom: .55rem; }
.tile-label { font-size: .95rem; font-weight: 600; }

/* ── Top action menus (groups, events pages) ──────────────── */
.groups-menu {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-bottom: 1.5rem;
}
.groups-menu .btn,
.groups-menu a.btn {
  background: #1f3526;
  border: 1px solid #3a5c40;
  color: #9dddb4;
  padding: .5rem 1rem;
  border-radius: 7px;
  font-family: 'Segoe UI', sans-serif;
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.groups-menu .btn:hover,
.groups-menu a.btn:hover {
  background: #2a4a30;
  color: #c5f5d5;
  text-decoration: none;
}

/* ── Data Tables (dark themed) ────────────────────────────── */
.event-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-family: 'Segoe UI', sans-serif;
  font-size: .94rem;
}
.event-table th {
  background: #1a2e22;
  color: #7de8ad;
  font-weight: 600;
  text-align: left;
  padding: .75rem .9rem;
  border-bottom: 2px solid #2a4a30;
}
.event-table td {
  padding: .7rem .9rem;
  border-bottom: 1px solid #1e3028;
  color: #c8ddd0;
  vertical-align: middle;
}
.event-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.event-table tr:hover td { background: rgba(58,199,121,.05); }
.event-table a { color: #7de8ad; }
.event-table a:hover { color: #b0f5cc; }

/* DataTables dark override */
.dataTables_wrapper { color: #b0cdb8; font-family: 'Segoe UI', sans-serif; }
.dataTables_filter input,
.dataTables_length select {
  background: #1a2a1e !important;
  color: #cde !important;
  border: 1px solid #2a4030 !important;
  border-radius: 5px !important;
  padding: .3rem .6rem !important;
}
.dataTables_info,
.dataTables_paginate { color: #7a9a84 !important; }
.paginate_button { color: #7a9a84 !important; border-radius: 4px !important; }
.paginate_button.current,
.paginate_button:hover { background: #1e3526 !important; color: #3ac779 !important; }
table.dataTable thead th { border-bottom: none !important; }

/* ── Profile info ─────────────────────────────────────────── */
.profile-info {
  background: #1a2820;
  border: 1px solid #2a3e2e;
  border-radius: 12px;
  padding: 1.6rem 2rem;
  margin-bottom: 1.5rem;
  font-family: 'Segoe UI', sans-serif;
}
.profile-info p { margin-bottom: .55rem; color: #c0d8c8; font-size: 1rem; }
.profile-info strong { color: #7de8ad; min-width: 130px; display: inline-block; }

/* ── Admin tools ──────────────────────────────────────────── */
.admin-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }

/* ── Forms inside member area ─────────────────────────────── */
.group-details-form { max-width: 680px; }
.group-details-form label,
.section-form label {
  display: block;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: .93rem;
  color: #a8c8b4;
  margin: 1rem 0 .25rem;
}
.group-details-form h3,
.section-form h3 {
  font-size: 1.05rem;
  color: #3ac779;
  margin: 1.6rem 0 .5rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid #1e3228;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 700;
  letter-spacing: .2px;
}
.group-details-form input[type=text],
.group-details-form input[type=email],
.group-details-form input[type=tel],
.group-details-form input[type=url],
.group-details-form input[type=number],
.group-details-form select,
.group-details-form textarea,
.section-form input,
.section-form select,
.section-form textarea {
  width: 100%;
  background: #111e16;
  color: #d4ede0;
  border: 1px solid #2a4030;
  border-radius: 7px;
  padding: .6rem .85rem;
  font-family: 'Segoe UI', sans-serif;
  font-size: .97rem;
  transition: border-color .2s, box-shadow .2s;
}
.group-details-form input:focus,
.group-details-form select:focus,
.group-details-form textarea:focus,
.section-form input:focus,
.section-form select:focus,
.section-form textarea:focus {
  outline: none;
  border-color: #3ac779;
  box-shadow: 0 0 0 3px rgba(58,199,121,.15);
}
.group-details-form textarea,
.section-form textarea { min-height: 80px; resize: vertical; }

/* Checkbox groups */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  margin: .3rem 0 .5rem;
}
.checkbox-group label {
  font-weight: 400;
  color: #b0cdb8;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
}
.checkbox-group input[type=checkbox] { accent-color: #3ac779; }

/* Submit button in member forms */
.group-details-form .btn,
.section-form .btn {
  margin-top: 1.5rem;
  background: #1e5c30;
  border: 1px solid #2d7a40;
  color: #d0f0dc;
  padding: .65rem 2rem;
  border-radius: 7px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.group-details-form .btn:hover,
.section-form .btn:hover {
  background: #267040;
  transform: translateY(-1px);
  color: #fff;
}

/* ── Action buttons: edit / delete ────────────────────────── */
.btn-edit {
  display: inline-block;
  background: #1d3f6a;
  color: #9dd4f5;
  padding: .35rem .8rem;
  border-radius: 5px;
  text-decoration: none;
  font-family: 'Segoe UI', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  transition: background .18s;
}
.btn-edit:hover { background: #254e82; color: #c4e8ff; text-decoration: none; }

.btn-delete-link {
  display: inline-block;
  background: #6a1f1f;
  color: #f5b8b8;
  padding: .35rem .75rem;
  border-radius: 5px;
  font-family: 'Segoe UI', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .18s;
}
.btn-delete-link:hover { background: #852424; color: #fdd; }

/* Delete confirm inline widget */
.delete-form-wrapper { display: inline-block; vertical-align: middle; }
.delete-warning {
  margin-top: .4rem;
  background: #2a1010;
  border: 1px solid #6a1f1f;
  border-radius: 7px;
  padding: .65rem .9rem;
  font-family: 'Segoe UI', sans-serif;
  font-size: .86rem;
  color: #f5b8b8;
}
.delete-warning p { margin-bottom: .4rem; color: #f5b8b8; }
.btn-delete-confirm {
  background: #8a2020;
  color: #fff;
  border: none;
  padding: .3rem .8rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: .85rem;
  margin-right: .4rem;
}
.btn-delete-confirm:hover { background: #aa2a2a; }
.btn-cancel-delete {
  background: #333;
  color: #bbb;
  border: none;
  padding: .3rem .8rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: .85rem;
}
.btn-cancel-delete:hover { background: #444; }

/* ── Success / error inline messages ──────────────────────── */
.success-message {
  background: rgba(58,199,121,.1);
  border-left: 4px solid #3ac779;
  color: #7de8ad;
  padding: .7rem 1rem;
  border-radius: 7px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  margin-bottom: 1rem;
}
.error-message {
  background: rgba(224,82,82,.1);
  border-left: 4px solid #e05252;
  color: #f5a0a0;
  padding: .7rem 1rem;
  border-radius: 7px;
  font-family: 'Segoe UI', sans-serif;
  margin-bottom: 1rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .member-wrapper { padding: 1.2rem 1rem 2rem; }
  .dashboard-tile-grid { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); }
  .event-table { font-size: .82rem; }
  .event-table th, .event-table td { padding: .5rem .55rem; }
}

/* ── Shared Form Styles (group + event forms) ─────────────────── */
.gf-card {
  background: #1a2820;
  border: 1px solid #2a4030;
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
}
.gf-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #5be09a;
  margin: 0 0 1.1rem;
}
.gf-opt {
  font-weight: 400;
  font-size: .82em;
  color: #556655;
  text-transform: none;
  letter-spacing: 0;
}
.gf-field-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: #668866;
  margin: .8rem 0 .4rem;
}
.gf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}
.gf-full { grid-column: 1 / -1; }

/* Pill checkboxes */
.gf-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .3rem;
}
.gf-pill-group-wide .gf-pill span { min-width: 200px; }
.gf-pill { display: contents; }
.gf-pill input { display: none; }
.gf-pill span {
  display: inline-block;
  padding: .35rem 1rem;
  border-radius: 20px;
  border: 1px solid #2a4030;
  color: #668866;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  cursor: pointer;
  transition: all .18s;
  user-select: none;
  background: transparent;
}
.gf-pill span:hover { border-color: #3a6a40; color: #9ed8b0; }
.gf-pill input:checked + span {
  background: #1a4a28;
  border-color: #3a7a40;
  color: #5be09a;
  font-weight: 600;
}
.gf-pill-belief span { font-size: .8rem; }

/* Textarea with counter */
.gf-textarea-wrap { position: relative; }
.gf-textarea-wrap textarea { width: 100%; padding-bottom: 1.4rem; }
.gf-char-count {
  position: absolute;
  bottom: .5rem;
  right: .75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  color: #445544;
  pointer-events: none;
}

/* Image upload */
.gf-img-wrap { display: flex; flex-direction: column; gap: .5rem; }
.gf-img-preview {
  max-height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #2a4030;
}
.gf-file-btn {
  display: inline-block;
  background: #1a3020;
  border: 1px solid #2d6a40;
  color: #5be09a;
  border-radius: 7px;
  padding: .45rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s;
}
.gf-file-btn:hover { background: #1e3d28; }
.gf-file-btn input[type=file] { display: none; }

/* Toggle label (online-only checkbox) */
.gf-toggle-label {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  color: #668866;
}
.gf-toggle-label input[type=checkbox] {
  margin-top: .15rem;
  accent-color: #5be09a;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.gf-toggle-text { flex: 1; }

/* Agreements */
.gf-agree {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  color: #668866;
}
.gf-agree input[type=checkbox] {
  margin-top: .15rem;
  accent-color: #5be09a;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Event type toggle cards */
.evt-type-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
}
.evt-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem .8rem;
  border: 2px solid #2a4030;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  text-align: center;
  background: transparent;
}
.evt-type-card:hover { border-color: #3a6a40; }
.evt-type-card.active { border-color: #5be09a; background: rgba(91,224,154,.06); }
.evt-type-card input { display: none; }
.evt-type-icon  { font-size: 1.6rem; margin-bottom: .3rem; }
.evt-type-label { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: .9rem; color: #d0eed8; }
.evt-type-desc  { font-family: 'DM Sans', sans-serif; font-size: .75rem; color: #556655; margin-top: .15rem; }

/* Recurrence panels */
.gf-rec-panel { margin-top: .3rem; }

@media (max-width: 600px) {
  .gf-grid-2 { grid-template-columns: 1fr; }
  .gf-full   { grid-column: 1; }
  .evt-type-group { grid-template-columns: 1fr; }
  .gf-pill-group-wide .gf-pill span { min-width: 0; }
}
