/* BalkanBox IPTV User Dashboard Styles - Unified & Modern */

:root {
  --bbx-g:#e5e7eb;
  --bbx-tx:#111827;
  --bbx-muted:#6b7280;
  --bbx-bg:#ffffff;
  --bbx-primary: #2563eb;
  --bbx-success: #10b981;
  --bbx-warning: #f59e0b;
  --bbx-danger: #dc2626;
  --bbx-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --bbx-shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.15);
  --bbx-radius: 8px;
  --bbx-radius-lg: 12px;
}

.bbx-wrap { color:var(--bbx-tx); }

/* Existing styles */
.bbx-infobar{
  border:1px solid var(--bbx-g);
  border-radius:14px;
  padding:16px;
  background:var(--bbx-bg);
  margin:12px 0 18px;
  display:flex;
  gap:16px;
  align-items:center;
  flex-wrap:wrap;
}
.bbx-pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid var(--bbx-g);
  font-size:13px;
}
.bbx-actions{ margin-left:auto; display:flex; gap:10px; flex-wrap:wrap; }
.bbx-btn{
  appearance:none;
  border:1px solid #111827;
  background:#111827;
  color:#fff;
  border-radius:10px;
  padding:8px 12px;
  font-weight:600;
  text-decoration:none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bbx-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.bbx-btn--ghost{ background:#fff; color:#111827; }

.bbx-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
@media (max-width:900px){ .bbx-grid{ grid-template-columns:1fr } }

.bbx-card{
  border:1px solid var(--bbx-g);
  border-radius:14px;
  background:var(--bbx-bg);
  padding:14px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.bbx-card:hover { border-color: #d1d5db; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.bbx-h{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.bbx-badges{ display:flex; gap:8px; flex-wrap:wrap; }
.bbx-badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  border:1px solid var(--bbx-g);
  background:#f8fafc;
}

.bbx-row{ display:grid; grid-template-columns:140px 1fr; gap:8px; margin:6px 0; }
.bbx-key{ color:var(--bbx-muted); font-size:12px; }
.bbx-val{ font-family:ui-monospace,Menlo,Consolas,monospace; }

.bbx-copy{
  margin-left:8px;
  border:1px solid var(--bbx-g);
  background:#fff;
  border-radius:var(--bbx-radius);
  padding:6px 12px;
  font-size:12px;
  cursor:pointer;
  transition: all 0.2s ease;
  color: var(--bbx-primary);
  font-weight: 500;
}

.bbx-copy:hover {
  background: var(--bbx-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--bbx-shadow);
}

.bbx-copy:active {
  transform: translateY(0);
}

.bbx-copy.copied {
  background: var(--bbx-success);
  color: white;
}

.bbx-empty{
  padding:20px;
  border:1px dashed var(--bbx-g);
  border-radius:14px;
  background:#fff;
  text-align:center;
  color:var(--bbx-muted);
}

/* New Modal Styles */
.bbx-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.bbx-modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bbx-modal-content h3 {
    margin: 0 0 20px 0;
    padding: 20px 20px 0 20px;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
}

.bbx-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #9ca3af;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}
.bbx-modal-close:hover { color: #374151; }

.bbx-extension-options {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.bbx-extend-btn {
    background: linear-gradient(135deg, var(--bbx-primary) 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.bbx-extend-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, var(--bbx-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.bbx-extend-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Enhanced line actions */
.bbx-line-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.bbx-extend-line-btn {
    background: var(--bbx-success);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}
.bbx-extend-line-btn:hover {
    background: #059669;
    color: white;
    transform: translateY(-1px);
}

.bbx-view-m3u, .bbx-copy-m3u {
    background: var(--bbx-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}
.bbx-view-m3u:hover, .bbx-copy-m3u:hover {
    background: #1d4ed8;
    color: white;
    transform: translateY(-1px);
}

/* M3U Modal Styles */
.bbx-m3u-content { padding: 0 20px 20px 20px; }
.bbx-m3u-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    resize: vertical;
    background: #f9fafb;
    margin-bottom: 12px;
}
.bbx-m3u-actions { display: flex; gap: 8px; }

/* Status badges */
.bbx-status-active { background: #dcfce7; color: #166534; }
.bbx-status-expired { background: #fef2f2; color: #dc2626; }
.bbx-status-trial { background: #fef3c7; color: #d97706; }

/* Copy states */
.bbx-btn.copied { background: var(--bbx-success) !important; }

/* Responsive design */
@media (max-width: 768px) {
    .bbx-modal-content { margin: 5% auto; width: 95%; }
    .bbx-extension-options { grid-template-columns: 1fr; }
    .bbx-line-actions { justify-content: center; }
}
