/* ─── Wedding Planner Plugin Styles v2 ────────────────────────────────────── */

:root {
  --wpp-primary: #7d2e4f;
  --wpp-accent:  #b56480;
  --wpp-light:   #fdf0f4;
  --wpp-border:  #e8c9d4;
}

/* ── Wrapper ── */
#wpp-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  color: #333;
}

/* ── Page Header ── */
.wpp-page-header { margin-bottom: 20px; }
.wpp-page-title { font-size: 26px; color: var(--wpp-primary); margin: 0 0 4px; }
.wpp-page-subtitle { margin: 0; color: #888; font-size: 15px; }

/* ── Tabs ── */
.wpp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 3px solid var(--wpp-border);
  margin-bottom: 24px;
  padding-bottom: 6px;
}
.wpp-tab {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  color: #888;
  transition: all .2s;
}
.wpp-tab:hover { background: var(--wpp-light); color: var(--wpp-accent); }
.wpp-tab.active {
  background: var(--wpp-light);
  color: var(--wpp-primary);
  font-weight: 600;
  border-bottom: 3px solid var(--wpp-primary);
}

/* ── Panels ── */
.wpp-panel { display: none; }
.wpp-panel.active { display: block; }
.wpp-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.wpp-panel-header h2 { margin: 0; font-size: 22px; color: var(--wpp-primary); }

/* ── Countdown ── */
.wpp-countdown-box {
  background: linear-gradient(135deg, var(--wpp-primary), var(--wpp-accent));
  color: #fff;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  font-size: 20px;
  margin-bottom: 24px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}
.wpp-countdown-box strong { font-size: 48px; display: block; line-height: 1.1; }

/* ── Stats ── */
.wpp-stats-row, .wpp-budget-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.wpp-stat-card {
  background: var(--wpp-light);
  border: 1px solid var(--wpp-border);
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wpp-stat-num { font-size: 26px; font-weight: 700; color: var(--wpp-primary); }
.wpp-stat-card span:last-child { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: .05em; }

/* ── Forms ── */
.wpp-form { background: #fafafa; border: 1px solid #eee; border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.wpp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.wpp-form label { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; color: #555; gap: 5px; }
.wpp-form input[type=text],
.wpp-form input[type=email],
.wpp-form input[type=number],
.wpp-form input[type=date],
.wpp-form input[type=url],
.wpp-form select,
.wpp-form textarea {
  border: 1px solid #ddd; border-radius: 6px; padding: 8px 10px;
  font-size: 14px; width: 100%; box-sizing: border-box; background: #fff; transition: border-color .2s;
}
.wpp-form input:focus, .wpp-form select:focus, .wpp-form textarea:focus {
  outline: none; border-color: var(--wpp-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wpp-accent) 20%, transparent);
}
.wpp-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

/* ── Buttons ── */
.wpp-btn {
  padding: 9px 20px; border-radius: 6px; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.wpp-btn.primary { background: var(--wpp-primary); color: #fff; }
.wpp-btn.primary:hover { filter: brightness(1.15); }
.wpp-btn.secondary { background: #eee; color: #555; }
.wpp-btn.secondary:hover { background: #ddd; }
.wpp-btn.danger { background: #c0392b; color: #fff; }
.wpp-btn.danger:hover { background: #922b21; }
.wpp-btn.small { padding: 5px 12px; font-size: 12px; }

/* ── Filter Row ── */
.wpp-filter-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.wpp-filter-row input, .wpp-filter-row select {
  border: 1px solid #ddd; border-radius: 6px; padding: 7px 10px; font-size: 14px;
}
.wpp-filter-row input { flex: 1; min-width: 180px; }

/* ── Tables ── */
.wpp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wpp-table th { background: var(--wpp-primary); color: #fff; padding: 10px 12px; text-align: left; font-weight: 600; }
.wpp-table td { padding: 9px 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
.wpp-table tr:hover td { background: var(--wpp-light); }
.wpp-table .actions { display: flex; gap: 6px; }

/* ── Badges ── */
.wpp-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-attending, .badge-booked, .badge-paid { background: #d5f5e3; color: #1e8449; }
.badge-declined, .badge-rejected { background: #fadbd8; color: #922b21; }
.badge-pending, .badge-shortlisted { background: #fef9e7; color: #b7950b; }
.badge-researching, .badge-meeting_booked { background: #eaf4fb; color: #1a5276; }
.badge-contacted { background: #fdf2e9; color: #b7770d; }
.badge-cancelled { background: #eee; color: #777; }
.priority-high { color: #c0392b; font-weight: 700; }
.priority-medium { color: #b7950b; }
.priority-low { color: #888; }

/* ── Shortlist Grid ── */
.wpp-shortlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.wpp-sl-card {
  background: #fff;
  border: 1px solid var(--wpp-border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
  cursor: pointer;
  position: relative;
}
.wpp-sl-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); }
.wpp-sl-card-img {
  width: 100%; height: 160px; object-fit: cover; display: block;
  background: var(--wpp-light);
}
.wpp-sl-card-img-placeholder {
  width: 100%; height: 160px; background: var(--wpp-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--wpp-border);
}
.wpp-sl-card-body { padding: 14px 16px; }
.wpp-sl-card-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--wpp-accent); margin-bottom: 4px; }
.wpp-sl-card-name { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 8px; }
.wpp-sl-card-notes { font-size: 13px; color: #666; margin-bottom: 10px; line-height: 1.4; max-height: 52px; overflow: hidden; }
.wpp-sl-card-footer { display: flex; align-items: center; justify-content: space-between; }
.wpp-sl-card-link { font-size: 12px; color: var(--wpp-primary); text-decoration: none; font-weight: 600; }
.wpp-sl-card-link:hover { text-decoration: underline; }
.wpp-sl-empty { text-align: center; padding: 40px; color: #aaa; font-size: 15px; grid-column: 1/-1; }
.wpp-sl-empty a { color: var(--wpp-primary); font-weight: 600; }

/* ── Shortlist Button (on vendor pages) ── */
.wpp-shortlist-btn-wrap { margin: 20px 0; }
.wpp-shortlist-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--wpp-primary) !important;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.wpp-shortlist-toggle:hover { filter: brightness(1.12); }
.wpp-shortlist-toggle.is-shortlisted { background: #fff; color: var(--wpp-primary); border: 2px solid var(--wpp-primary); }
.wpp-shortlist-toggle.is-shortlisted .wpp-sl-icon::before { content: "❤️"; }
.wpp-sl-icon { font-size: 18px; }
.wpp-sl-login-prompt { font-size: 14px; color: #888; margin-top: 8px; }

/* ── Checklist ── */
.wpp-task-group { margin-bottom: 16px; }
.wpp-task-group-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--wpp-accent); margin-bottom: 6px; padding: 4px 0; border-bottom: 1px solid var(--wpp-border); }
.wpp-task-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 10px 14px; margin-bottom: 6px; transition: border-color .2s; }
.wpp-task-item:hover { border-color: var(--wpp-border); }
.wpp-task-item.completed { opacity: .55; }
.wpp-task-item.completed .task-label { text-decoration: line-through; }
.wpp-task-item input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--wpp-primary); }
.task-label { flex: 1; font-size: 14px; }
.task-meta { font-size: 12px; color: #aaa; }
.task-actions { display: flex; gap: 5px; }

/* ── Modals ── */
.wpp-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; align-items: center; justify-content: center; }
.wpp-modal.open { display: flex; }
.wpp-modal-inner { background: #fff; border-radius: 12px; padding: 28px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.wpp-modal-inner h3 { margin: 0 0 18px; color: var(--wpp-primary); font-size: 20px; }
.wpp-modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; color: #aaa; line-height: 1; }
.wpp-modal-close:hover { color: #333; }

/* ── Toast ── */
#wpp-toast { position: fixed; bottom: 30px; right: 30px; background: var(--wpp-primary); color: #fff; padding: 12px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; display: none; z-index: 10000; box-shadow: 0 4px 20px rgba(0,0,0,.2); }
#wpp-toast.show { display: block; animation: fadeInUp .3s ease; }
@keyframes fadeInUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ── Login notice ── */
.wpp-login-notice { background: var(--wpp-light); border: 1px solid var(--wpp-border); padding: 16px 20px; border-radius: 8px; color: var(--wpp-primary); }

/* ── Responsive ── */
@media (max-width: 620px) {
  .wpp-grid-2 { grid-template-columns: 1fr; }
  .wpp-tabs { gap: 2px; }
  .wpp-tab { padding: 8px 10px; font-size: 12px; }
  .wpp-table { font-size: 12px; }
  .wpp-table th, .wpp-table td { padding: 7px 8px; }
  .wpp-shortlist-grid { grid-template-columns: 1fr; }
  .wpp-form-actions { flex-direction: column; }
  .wpp-form-actions .wpp-btn { width: 100%; text-align: center; }
}

/* ── Upgrade Wall ── */
.wpp-upgrade-wall {
  text-align: center;
  padding: 52px 24px 48px;
  background: linear-gradient(160deg, var(--wpp-light) 0%, #fff 100%);
  border: 2px dashed var(--wpp-border);
  border-radius: 16px;
  margin-top: 8px;
}
.wpp-upgrade-icon { font-size: 52px; margin-bottom: 12px; }
.wpp-upgrade-wall h3 { font-size: 22px; color: var(--wpp-primary); margin: 0 0 12px; }
.wpp-upgrade-msg { font-size: 15px; color: #555; max-width: 480px; margin: 0 auto 24px; line-height: 1.6; }
.wpp-upgrade-cta { font-size: 16px; padding: 13px 32px; border-radius: 8px; display: inline-block; text-decoration: none; }
.wpp-upgrade-cta:hover { text-decoration: none; filter: brightness(1.1); }
.wpp-upgrade-sub { margin-top: 16px; font-size: 13px; color: #aaa; }
.wpp-upgrade-sub a { color: var(--wpp-primary); }

/* ── View Toggle (list / calendar) ── */
.wpp-view-toggle { display: flex; border: 1px solid var(--wpp-border); border-radius: 6px; overflow: hidden; }
.wpp-view-btn {
  background: #fff; border: none; padding: 7px 14px; font-size: 13px;
  font-weight: 600; cursor: pointer; color: #888; transition: all .2s; font-family: inherit;
}
.wpp-view-btn:hover { background: var(--wpp-light); color: var(--wpp-primary); }
.wpp-view-btn.active { background: var(--wpp-primary); color: #fff; }

/* ── Calendar ── */
#checklist-calendar { margin-top: 8px; }

.wpp-cal-header {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-bottom: 12px;
}
.wpp-cal-title { font-size: 18px; font-weight: 700; color: var(--wpp-primary); min-width: 180px; text-align: center; }
.wpp-cal-nav {
  background: var(--wpp-light); border: 1px solid var(--wpp-border);
  border-radius: 6px; width: 34px; height: 34px; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s; color: var(--wpp-primary);
}
.wpp-cal-nav:hover { background: var(--wpp-primary); color: #fff; border-color: var(--wpp-primary); }

.wpp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--wpp-border);
  border: 1px solid var(--wpp-border);
  border-radius: 10px;
  overflow: hidden;
}
.wpp-cal-dow {
  background: var(--wpp-primary); color: #fff;
  text-align: center; padding: 8px 4px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.wpp-cal-day {
  background: #fff; min-height: 90px; padding: 6px;
  position: relative; vertical-align: top;
  transition: background .15s;
}
.wpp-cal-day:hover { background: var(--wpp-light); }
.wpp-cal-blank { background: #f9f9f9; }
.wpp-cal-today { background: #fff8fb !important; }
.wpp-cal-today .wpp-cal-day-num {
  background: var(--wpp-primary); color: #fff;
  border-radius: 50%; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.wpp-cal-day-num {
  font-size: 13px; font-weight: 600; color: #555;
  margin-bottom: 4px; display: flex; align-items: center;
  justify-content: center; width: 24px; height: 24px;
}

.wpp-cal-chip {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; border-radius: 4px; padding: 2px 5px;
  margin-bottom: 2px; cursor: pointer; line-height: 1.3;
  transition: opacity .15s;
}
.wpp-cal-chip:hover { opacity: .8; }
.wpp-cal-chip-done span:last-child { text-decoration: line-through; opacity: .5; }
.wpp-cal-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.wpp-cal-more { font-size: 10px; color: #aaa; padding: 1px 4px; }

.wpp-cal-unscheduled {
  margin-top: 14px; padding: 14px 16px;
  background: #fafafa; border: 1px solid #eee; border-radius: 8px;
  font-size: 13px; color: #555;
}
.wpp-cal-unscheduled strong { display: block; margin-bottom: 8px; }
.wpp-cal-unscheduled-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wpp-cal-unscheduled-list .wpp-cal-chip { display: inline-flex; }

@media (max-width: 620px) {
  .wpp-cal-day { min-height: 60px; padding: 3px; }
  .wpp-cal-day-num { font-size: 11px; width: 20px; height: 20px; }
  .wpp-cal-chip { font-size: 10px; padding: 1px 3px; }
  .wpp-cal-dow { padding: 6px 2px; font-size: 10px; }
  .wpp-cal-chip span:last-child { display: none; }
  .wpp-cal-dot { width: 8px; height: 8px; }
}

/* ── Budget Pie Chart ── */
#wpp-budget-chart-wrap {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--wpp-border);
  border-radius: 12px;
  padding: 22px 24px;
}
.wpp-chart-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wpp-primary);
  margin: 0 0 18px;
}
.wpp-chart-layout {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
#wpp-budget-pie {
  flex-shrink: 0;
  border-radius: 50%;
}
.wpp-chart-legend {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wpp-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.wpp-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.wpp-legend-label {
  flex: 1;
  color: #444;
  font-weight: 500;
}
.wpp-legend-val {
  color: #555;
  white-space: nowrap;
}
.wpp-legend-val em {
  color: #aaa;
  font-style: normal;
  font-size: 12px;
}
@media (max-width: 560px) {
  .wpp-chart-layout { flex-direction: column; align-items: flex-start; }
  #wpp-budget-pie { width: 200px; height: 200px; }
}

/* ── Non-member Signup Wall (shown via PHP shortcode) ── */
.wpp-signup-wall {
  text-align: center;
  padding: 60px 24px 52px;
  background: linear-gradient(160deg, var(--wpp-light) 0%, #fff 100%);
  border: 2px dashed var(--wpp-border);
  border-radius: 16px;
  max-width: 520px;
  margin: 40px auto;
}
.wpp-signup-icon { font-size: 56px; margin-bottom: 14px; }
.wpp-signup-wall h2 { font-size: 26px; color: var(--wpp-primary); margin: 0 0 12px; }
.wpp-signup-msg { font-size: 15px; color: #555; max-width: 420px; margin: 0 auto 28px; line-height: 1.65; }
.wpp-btn-signup {
  display: inline-block;
  background: var(--wpp-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: filter .2s;
}
.wpp-btn-signup:hover { filter: brightness(1.12); color: #fff; text-decoration: none; }
.wpp-signup-login { margin-top: 18px; font-size: 13px; color: #aaa; }
.wpp-signup-login a { color: var(--wpp-primary); }

/* ── Guest pax total display ── */
.wpp-pax-total {
  background: var(--wpp-light);
  border: 1px solid var(--wpp-border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
  display: inline-block;
}
.wpp-pax-total strong {
  font-size: 18px;
  color: var(--wpp-primary);
  margin-left: 4px;
}

/* ── Guest summary panel ───────────────────────────────────────────── */
.wpp-guest-summary {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .wpp-guest-summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
  .wpp-guest-summary { grid-template-columns: repeat(2, 1fr); }
}
.wpp-guest-sum-card {
  background: #fff;
  border: 1px solid var(--wpp-border);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wpp-guest-sum-card span:first-child { /* number */
  font-size: 26px;
  font-weight: 800;
  color: var(--wpp-primary);
  line-height: 1;
}
.wpp-guest-sum-card span:last-child { /* label */
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.wpp-guest-sum-bride { border-top: 3px solid #b56480; }
.wpp-guest-sum-groom { border-top: 3px solid #4a90a4; }

/* ── Print / no-print helpers ─────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
}
