/* =========================================================
   INES Prime Membership Pro — Frontend Styles
   ========================================================= */

:root {
  --ipmp-primary:     #2C3E8C;
  --ipmp-accent:      #F4A61E;
  --ipmp-bg:          #F7F9FC;
  --ipmp-card:        #FFFFFF;
  --ipmp-border:      #E2E8F0;
  --ipmp-text:        #1A202C;
  --ipmp-muted:       #718096;
  --ipmp-success:     #38A169;
  --ipmp-error:       #E53E3E;
  --ipmp-radius:      10px;
  --ipmp-shadow:      0 4px 24px rgba(44,62,140,.10);
  --ipmp-transition:  0.22s ease;
}

/* ── Base wrappers ─────────────────────────────────────── */
.ipmp-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ipmp-text);
  line-height: 1.6;
}

/* ── Buttons ───────────────────────────────────────────── */
.ipmp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--ipmp-radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--ipmp-transition);
  white-space: nowrap;
}
.ipmp-btn:focus { outline: 3px solid rgba(44,62,140,.35); }
.ipmp-btn-primary  { background: var(--ipmp-primary); color: #fff; }
.ipmp-btn-primary:hover  { background: #1e2d7a; color: #fff; }
.ipmp-btn-secondary { background: transparent; color: var(--ipmp-primary); border: 2px solid var(--ipmp-primary); }
.ipmp-btn-secondary:hover { background: var(--ipmp-primary); color: #fff; }
.ipmp-btn-accent   { background: var(--ipmp-accent); color: #1a1a1a; }
.ipmp-btn-accent:hover { filter: brightness(1.08); }
.ipmp-btn-full     { width: 100%; justify-content: center; }
.ipmp-btn[disabled], .ipmp-btn.loading { opacity: .65; pointer-events: none; }

/* ── Forms ─────────────────────────────────────────────── */
.ipmp-form-group {
  margin-bottom: 18px;
}
.ipmp-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ipmp-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ipmp-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--ipmp-border);
  border-radius: var(--ipmp-radius);
  font-size: 15px;
  color: var(--ipmp-text);
  background: #fff;
  transition: border-color var(--ipmp-transition), box-shadow var(--ipmp-transition);
  box-sizing: border-box;
}
.ipmp-input:focus {
  border-color: var(--ipmp-primary);
  box-shadow: 0 0 0 3px rgba(44,62,140,.12);
  outline: none;
}
.ipmp-input.error { border-color: var(--ipmp-error); }

/* ── Alerts ────────────────────────────────────────────── */
.ipmp-alert {
  padding: 12px 16px;
  border-radius: var(--ipmp-radius);
  font-size: 14px;
  margin-bottom: 14px;
}
.ipmp-alert-success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.ipmp-alert-error   { background: #fff5f5; color: #9b2c2c; border: 1px solid #fed7d7; }
.ipmp-alert-info    { background: #ebf8ff; color: #2a4365; border: 1px solid #bee3f8; }

/* ── Auth cards ─────────────────────────────────────────── */
.ipmp-auth-wrap {
  max-width: 440px;
  margin: 40px auto;
}
.ipmp-auth-card {
  background: var(--ipmp-card);
  border-radius: 16px;
  box-shadow: var(--ipmp-shadow);
  padding: 40px;
}
.ipmp-auth-card h2 {
  margin: 0 0 24px;
  font-size: 22px;
  color: var(--ipmp-primary);
}
.ipmp-auth-links {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: var(--ipmp-muted);
}
.ipmp-auth-links a { color: var(--ipmp-primary); font-weight: 600; text-decoration: none; }
.ipmp-auth-links a:hover { text-decoration: underline; }

/* ── Pricing grid ────────────────────────────────────────── */
.ipmp-pricing-wrap {
  padding: 30px 0;
}
.ipmp-pricing-wrap h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--ipmp-primary);
}
.ipmp-pricing-subtitle {
  text-align: center;
  color: var(--ipmp-muted);
  margin-bottom: 36px;
}
.ipmp-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.ipmp-plan-card {
  background: var(--ipmp-card);
  border: 2px solid var(--ipmp-border);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform var(--ipmp-transition), box-shadow var(--ipmp-transition);
}
.ipmp-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ipmp-shadow);
}
.ipmp-plan-card.featured {
  border-color: var(--ipmp-primary);
  position: relative;
}
.ipmp-plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ipmp-accent);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.ipmp-plan-name { font-size: 18px; font-weight: 700; color: var(--ipmp-primary); margin-bottom: 6px; }
.ipmp-plan-desc { font-size: 14px; color: var(--ipmp-muted); margin-bottom: 20px; flex-grow: 1; }
.ipmp-plan-price { margin-bottom: 20px; }
.ipmp-plan-amount { font-size: 36px; font-weight: 800; color: var(--ipmp-text); }
.ipmp-plan-period { font-size: 14px; color: var(--ipmp-muted); }
.ipmp-plan-features { list-style: none; padding: 0; margin: 0 0 24px; }
.ipmp-plan-features li { padding: 6px 0; font-size: 14px; color: var(--ipmp-text); }
.ipmp-plan-features li::before { content: '✓ '; color: var(--ipmp-success); font-weight: 700; }

/* ── Dashboard ───────────────────────────────────────────── */
.ipmp-dashboard-wrap {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}
.ipmp-dashboard-header {
  background: linear-gradient(135deg, var(--ipmp-primary) 0%, #1a2567 100%);
  border-radius: 16px;
  padding: 30px;
  color: #fff;
  margin-bottom: 28px;
}
.ipmp-dashboard-header h2 { margin: 0 0 6px; font-size: 22px; }
.ipmp-dashboard-header p  { margin: 0; opacity: .8; font-size: 15px; }
.ipmp-membership-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ipmp-accent);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-top: 12px;
}
.ipmp-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.ipmp-stat-card {
  background: var(--ipmp-card);
  border: 1px solid var(--ipmp-border);
  border-radius: 12px;
  padding: 22px;
}
.ipmp-stat-card .label { font-size: 12px; color: var(--ipmp-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.ipmp-stat-card .value { font-size: 26px; font-weight: 800; color: var(--ipmp-primary); margin-top: 6px; }
.ipmp-table-wrap {
  background: var(--ipmp-card);
  border: 1px solid var(--ipmp-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.ipmp-table-wrap h3 { padding: 18px 22px; margin: 0; border-bottom: 1px solid var(--ipmp-border); font-size: 16px; }
.ipmp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ipmp-table th { background: var(--ipmp-bg); padding: 12px 16px; text-align: left; font-weight: 600; color: var(--ipmp-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.ipmp-table td { padding: 12px 16px; border-top: 1px solid var(--ipmp-border); }
.ipmp-table tr:hover td { background: #f9fbff; }

/* ── Status badges ───────────────────────────────────────── */
.ipmp-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.ipmp-badge-active, .ipmp-badge-completed { background: #f0fff4; color: #276749; }
.ipmp-badge-pending    { background: #fffaf0; color: #7b5e00; }
.ipmp-badge-failed, .ipmp-badge-expired { background: #fff5f5; color: #9b2c2c; }
.ipmp-badge-cancelled  { background: #f7fafc; color: #4a5568; }

/* ── Checkout ─────────────────────────────────────────────── */
.ipmp-checkout-wrap {
  max-width: 560px;
  margin: 36px auto;
  padding: 0 20px;
}
.ipmp-checkout-card {
  background: var(--ipmp-card);
  border-radius: 16px;
  box-shadow: var(--ipmp-shadow);
  overflow: hidden;
}
.ipmp-checkout-header {
  background: linear-gradient(135deg, var(--ipmp-primary), #1a2567);
  color: #fff;
  padding: 28px 32px;
}
.ipmp-checkout-header h2 { margin: 0 0 4px; font-size: 20px; }
.ipmp-checkout-header .price { font-size: 32px; font-weight: 800; }
.ipmp-checkout-body { padding: 28px 32px; }
.ipmp-gateway-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.ipmp-gateway-tab {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  border: 2px solid var(--ipmp-border);
  border-radius: var(--ipmp-radius);
  background: var(--ipmp-bg);
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ipmp-muted);
  transition: all var(--ipmp-transition);
}
.ipmp-gateway-tab.active {
  border-color: var(--ipmp-primary);
  background: #fff;
  color: var(--ipmp-primary);
}
.ipmp-gateway-panel { display: none; }
.ipmp-gateway-panel.active { display: block; }
.ipmp-phone-hint { font-size: 12px; color: var(--ipmp-muted); margin-top: 5px; }
.ipmp-payment-loader {
  text-align: center;
  padding: 30px;
  display: none;
}
.ipmp-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--ipmp-border);
  border-top-color: var(--ipmp-primary);
  border-radius: 50%;
  animation: ipmp-spin .75s linear infinite;
  margin: 0 auto 16px;
}
@keyframes ipmp-spin { to { transform: rotate(360deg); } }

/* ── Restricted content box ─────────────────────────────── */
.ipmp-restricted-content {
  background: var(--ipmp-bg);
  border: 2px dashed var(--ipmp-border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin: 24px 0;
}
.ipmp-restricted-icon { font-size: 40px; margin-bottom: 12px; }
.ipmp-restricted-content h3 { font-size: 18px; color: var(--ipmp-primary); margin-bottom: 8px; }
.ipmp-restricted-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .ipmp-auth-card    { padding: 24px; }
  .ipmp-checkout-body,.ipmp-checkout-header { padding: 20px; }
  .ipmp-pricing-grid { grid-template-columns: 1fr; }
  .ipmp-dashboard-cards { grid-template-columns: 1fr 1fr; }
}

/* ── Offline payment instructions ─────────────────── */
.ipmp-offline-instructions {
  background: #f7f9fc;
  border: 1.5px solid var(--ipmp-border);
  border-radius: var(--ipmp-radius);
  padding: 22px;
  margin-top: 18px;
}
.ipmp-offline-ref {
  font-size: 15px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--ipmp-border);
}
.ipmp-offline-ref strong {
  color: var(--ipmp-primary);
  font-size: 16px;
  letter-spacing: .5px;
}
.ipmp-offline-steps {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ipmp-text);
  white-space: pre-wrap;
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--ipmp-border);
  margin-bottom: 12px;
  font-family: inherit;
}
.ipmp-offline-note {
  font-size: 13px;
  color: var(--ipmp-muted);
  margin-top: 10px;
  padding: 10px 14px;
  background: #fffaf0;
  border-radius: 8px;
  border: 1px solid #f6e05e;
}
.ipmp-offline-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid var(--ipmp-border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ipmp-muted);
  transition: all var(--ipmp-transition);
  margin-top: 8px;
}
.ipmp-offline-copy-btn:hover {
  border-color: var(--ipmp-primary);
  color: var(--ipmp-primary);
}
