/* ============================================================
   M3U-EDIT.COM v2 — Access Modal & Status Banner Styles
   Location: assets/css/access-modal.css
   ============================================================ */

/* ============================================================
   ACCESS BANNER (shown at top of tool pages)
   ============================================================ */
.access-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.access-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.access-banner-content { flex: 1; min-width: 0; }
.access-banner-title { font-weight: 700; margin-bottom: 2px; }
.access-banner-text { font-size: 13px; opacity: 0.9; }

.access-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  flex-shrink: 0;
  transition: all var(--t-fast);
}
.access-banner-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: var(--primary);
}

/* Free tier banner (green) */
.access-banner.tier-free {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.04));
  border: 1px solid rgba(16,185,129,0.2);
  color: var(--text);
}
.access-banner.tier-free .access-banner-icon {
  background: var(--success);
  color: #fff;
}

/* Account required (blue) */
.access-banner.tier-account {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.04));
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--text);
}
.access-banner.tier-account .access-banner-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

/* Premium (gold) */
.access-banner.tier-premium {
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(251,146,60,0.04));
  border: 1px solid rgba(245,158,11,0.2);
  color: var(--text);
}
.access-banner.tier-premium .access-banner-icon {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
}

/* Limit warning (red) */
.access-banner.tier-limit {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(239,68,68,0.04));
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--text);
}
.access-banner.tier-limit .access-banner-icon {
  background: var(--danger);
  color: #fff;
}

/* ============================================================
   USAGE PROGRESS BAR (for guests)
   ============================================================ */
.usage-meter {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.usage-meter-bar {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.usage-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, var(--success), var(--success));
}
.usage-meter-fill.warn  { background: linear-gradient(90deg, var(--warning), #f59e0b); }
.usage-meter-fill.danger { background: linear-gradient(90deg, var(--danger), #f87171); }

.usage-meter-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   FULL-SCREEN ACCESS MODAL
   ============================================================ */
.access-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 20px;
}
.access-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.access-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}
.access-modal-backdrop.show .access-modal {
  transform: scale(1);
}

.access-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-secondary);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  z-index: 1;
}
.access-modal-close:hover {
  background: var(--danger);
  color: #fff;
  transform: rotate(90deg);
}

.access-modal-header {
  padding: 32px 28px 20px;
  text-align: center;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.access-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: 0 10px 25px rgba(99,102,241,0.4);
  animation: modal-icon-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modal-icon-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.access-modal-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
}
.access-modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.access-modal-body {
  padding: 24px 28px;
}

.access-modal-benefits {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.access-modal-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.access-modal-benefits li:last-child { border-bottom: none; }
.access-modal-benefits li::before {
  content: '✓';
  color: var(--success);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.access-modal-credit-box {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.04));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin-bottom: 24px;
}
.access-modal-credit-amount {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--success), #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.access-modal-credit-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 4px;
}

.access-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.access-modal-actions .btn {
  width: 100%;
  padding: 13px;
  font-size: 14px;
}

.access-modal-footer {
  padding: 14px 28px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.access-modal-footer a { color: var(--primary); font-weight: 600; }

/* ============================================================
   TOOL TILE LOCK OVERLAY (on listings)
   ============================================================ */
.tool-tile.tile-login_required::after {
  content: '🔐';
  position: absolute;
  bottom: 18px;
  right: 18px;
  font-size: 16px;
}

.tool-tile.tile-premium {
  position: relative;
}
.tool-tile.tile-premium::after {
  content: '⭐';
  position: absolute;
  bottom: 18px;
  right: 18px;
  font-size: 16px;
}

.tool-tile.tile-locked {
  opacity: 0.6;
  cursor: not-allowed;
}
.tool-tile.tile-locked:hover {
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .access-banner {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
  .access-banner-cta { width: 100%; justify-content: center; }
  .access-modal { border-radius: var(--radius-lg); }
  .access-modal-header { padding: 24px 20px 16px; }
  .access-modal-body { padding: 18px 20px; }
  .access-modal-title { font-size: 19px; }
  .access-modal-icon { width: 56px; height: 56px; font-size: 24px; }
}
