/* Laurette Loyalty — Frontend Styles */

:root {
  --llp-brand:    #c9a07c;
  --llp-brand-bg: #fdf5ee;
  --llp-text:     #1a1a1a;
  --llp-muted:    #6b6b6b;
  --llp-border:   #e8e0d8;
  --llp-surface:  #fafafa;
  --llp-radius:   10px;
  --llp-success-bg:  #edf7f0;
  --llp-success-txt: #1a7a3e;
  --llp-error-bg:    #fdecea;
  --llp-error-txt:   #b91c1c;
}

.llp-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--llp-text);
  max-width: 680px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.5;
}

/* Toast */
.llp-toast {
  display: none;
  background: var(--llp-success-bg);
  color: var(--llp-success-txt);
  border: 1px solid #b2dfc2;
  border-radius: var(--llp-radius);
  padding: 10px 16px;
  margin-bottom: 1rem;
  font-size: 14px;
}
.llp-toast.llp-toast--error {
  background: var(--llp-error-bg);
  color: var(--llp-error-txt);
  border-color: #f5b8b4;
}
.llp-toast.visible { display: block; }

/* Login prompt */
.llp-login-prompt {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px solid var(--llp-border);
  border-radius: 16px;
  max-width: 440px;
  margin: 0 auto;
}
.llp-login-prompt .llp-login-icon { font-size: 48px; margin-bottom: 1rem; }
.llp-login-prompt h3 { font-size: 22px; margin: 0 0 .5rem; }
.llp-login-prompt p  { color: var(--llp-muted); margin: 0 0 1.5rem; }
.llp-btn-primary, .llp-btn-secondary {
  display: block;
  padding: 12px;
  border-radius: var(--llp-radius);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: .75rem;
  transition: opacity .15s;
}
.llp-btn-primary    { background: var(--llp-brand); color: #fff; }
.llp-btn-secondary  { border: 1px solid var(--llp-border); color: var(--llp-text); }
.llp-btn-primary:hover, .llp-btn-secondary:hover { opacity: .85; }

/* Header */
.llp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--llp-border);
  margin-bottom: 1.25rem;
}
.llp-header-left { display: flex; align-items: center; gap: 12px; }
.llp-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--llp-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
  flex-shrink: 0;
}
.llp-header-name { font-size: 16px; font-weight: 600; }
.llp-tier-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 3px 9px; border-radius: 99px; margin-top: 4px;
  font-weight: 500;
}
.llp-tier-bronze  { background: #fdebd0; color: #7c4b05; }
.llp-tier-silver  { background: #eaeaea; color: #444; }
.llp-tier-gold    { background: #fff3cd; color: #7c5e05; }
.llp-tier-diamond { background: #ede9fe; color: #4c1d95; }

.llp-header-right { text-align: right; }
.llp-balance-label { font-size: 12px; color: var(--llp-muted); text-transform: capitalize; }
.llp-balance-val   { font-size: 32px; font-weight: 700; color: var(--llp-brand); line-height: 1; }

/* Progress */
.llp-progress-wrap { margin-bottom: 1.25rem; }
.llp-progress-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--llp-muted); margin-bottom: 6px; }
.llp-progress-bar { height: 6px; background: var(--llp-border); border-radius: 99px; overflow: hidden; }
.llp-progress-fill { height: 100%; background: var(--llp-brand); border-radius: 99px; transition: width .4s ease; }

/* Nav */
.llp-nav {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--llp-border);
  margin-bottom: 1.25rem;
}
.llp-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 8px 14px 10px; font-size: 14px; color: var(--llp-muted); cursor: pointer;
  margin-bottom: -1px; transition: color .15s;
}
.llp-tab.active, .llp-tab[aria-selected="true"] {
  color: var(--llp-text); border-bottom-color: var(--llp-brand); font-weight: 500;
}
.llp-tab:hover:not(.active) { color: var(--llp-text); }

/* Panels */
.llp-panel { display: none; }
.llp-panel.active { display: block; }
.llp-section-title { font-size: 13px; color: var(--llp-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }

/* Action list */
.llp-action-list { border: 1px solid var(--llp-border); border-radius: var(--llp-radius); overflow: hidden; }
.llp-action-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--llp-border);
}
.llp-action-row:last-child { border-bottom: none; }
.llp-action-info { display: flex; align-items: center; gap: 12px; }
.llp-action-icon { font-size: 22px; flex-shrink: 0; }
.llp-action-name { font-size: 14px; font-weight: 500; }
.llp-action-desc { font-size: 12px; color: var(--llp-muted); margin-top: 2px; }

.llp-earn-btn, .llp-redeem-btn {
  background: none; border: 1px solid var(--llp-border); border-radius: 8px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--llp-text);
  white-space: nowrap; transition: border-color .15s, background .15s;
}
.llp-earn-btn:hover, .llp-redeem-btn:hover { border-color: var(--llp-brand); background: var(--llp-brand-bg); }
.llp-earn-btn:disabled, .llp-redeem-btn:disabled { opacity: .4; cursor: not-allowed; }
.llp-earn-btn.llp-loading { opacity: .6; pointer-events: none; }

.llp-pts-tag {
  font-size: 12px; font-weight: 500; color: var(--llp-success-txt);
  background: var(--llp-success-bg); padding: 4px 10px; border-radius: 99px;
  white-space: nowrap;
}

/* Rewards grid */
.llp-rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.llp-reward-card {
  border: 1px solid var(--llp-border); border-radius: var(--llp-radius);
  padding: 1rem; display: flex; flex-direction: column;
}
.llp-reward-card.llp-locked { opacity: .55; }
.llp-reward-icon { font-size: 28px; margin-bottom: 8px; }
.llp-reward-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.llp-reward-desc { font-size: 12px; color: var(--llp-muted); flex: 1; margin-bottom: 10px; }
.llp-reward-footer { display: flex; align-items: center; justify-content: space-between; }
.llp-reward-cost  { font-size: 13px; font-weight: 600; color: var(--llp-brand); }

/* Tiers */
.llp-tier-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--llp-border);
}
.llp-tier-row:last-child { border-bottom: none; }
.llp-tier-row.llp-tier-active { background: var(--llp-brand-bg); margin: 0 -12px; padding: 14px 12px; border-radius: var(--llp-radius); border-bottom: none; }
.llp-tier-badge {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.llp-tier-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.llp-tier-range { font-size: 12px; font-weight: 400; color: var(--llp-muted); }
.llp-tier-mult  { font-size: 13px; color: var(--llp-brand); font-weight: 500; margin: 3px 0; }
.llp-tier-perks { font-size: 12px; color: var(--llp-muted); }
.llp-tier-body { flex: 1; }
.llp-your-tier  { font-size: 12px; color: var(--llp-brand); font-weight: 500; margin-top: 2px; flex-shrink: 0; }

/* History */
.llp-history-list { border: 1px solid var(--llp-border); border-radius: var(--llp-radius); overflow: hidden; }
.llp-history-row  {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--llp-border);
}
.llp-history-row:last-child { border-bottom: none; }
.llp-history-desc { font-size: 14px; }
.llp-history-date { font-size: 12px; color: var(--llp-muted); margin-top: 2px; }
.llp-history-pts  { font-size: 15px; font-weight: 600; }
.llp-pts-pos { color: var(--llp-success-txt); }
.llp-pts-neg { color: #b91c1c; }

.llp-empty { color: var(--llp-muted); font-size: 14px; padding: 2rem 0; text-align: center; }

/* WooCommerce thank you notice */
.llp-thankyou-notice {
  background: var(--llp-brand-bg); border: 1px solid #e8d5be;
  border-radius: var(--llp-radius); padding: 12px 16px; margin-top: 1rem;
  font-size: 15px; color: var(--llp-text);
}
