/* ============================================================
   XMLA Voice & Video Contact — Front-end & Admin Styles
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --xmla-blue-900:   #0d1b3e;
  --xmla-blue-800:   #0d47a1;
  --xmla-blue-600:   #1565c0;
  --xmla-blue-500:   #1a73e8;
  --xmla-blue-400:   #4295f7;
  --xmla-blue-300:   #7ab8f9;

  --xmla-success:    #10b981;
  --xmla-warning:    #f59e0b;
  --xmla-error:      #ef4444;
  --xmla-danger:     #dc2626;

  --xmla-glass-bg:   rgba(255,255,255,0.06);
  --xmla-glass-border: rgba(255,255,255,0.12);
  --xmla-glass-shadow: 0 24px 64px rgba(0,0,0,0.6);

  --xmla-text-primary:   #f1f5f9;
  --xmla-text-secondary: rgba(241,245,249,0.65);
  --xmla-text-muted:     rgba(241,245,249,0.35);

  --xmla-radius-sm:  8px;
  --xmla-radius-md:  14px;
  --xmla-radius-lg:  20px;
  --xmla-radius-xl:  28px;

  --xmla-transition: 180ms cubic-bezier(0.4,0,0.2,1);
  --xmla-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

/* ── Front-end Wrapper ─────────────────────────────────────── */
.xmla-vvc-wrap {
  font-family: var(--xmla-font);
  color: var(--xmla-text-primary);
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

.xmla-vvc-wrap *,
.xmla-vvc-wrap *::before,
.xmla-vvc-wrap *::after {
  box-sizing: border-box;
}

/* ── Cards ─────────────────────────────────────────────────── */
.xmla-vvc-card {
  background: var(--xmla-glass-bg);
  border: 1px solid var(--xmla-glass-border);
  border-radius: var(--xmla-radius-xl);
  box-shadow: var(--xmla-glass-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.xmla-vvc-card-inner {
  padding: 36px 32px;
}

@media (max-width: 480px) {
  .xmla-vvc-card-inner {
    padding: 24px 20px;
  }
}

/* ── Privacy Card ──────────────────────────────────────────── */
.xmla-vvc-privacy-card .xmla-vvc-card-inner {
  text-align: center;
}

.xmla-vvc-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(26,115,232,0.25), rgba(13,71,161,0.15));
  border: 1px solid rgba(26,115,232,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--xmla-blue-400);
}

.xmla-vvc-heading {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--xmla-text-primary);
  line-height: 1.2;
}

.xmla-vvc-subtext {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--xmla-text-secondary);
  line-height: 1.6;
}

.xmla-vvc-privacy-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
  display: inline-block;
}

.xmla-vvc-privacy-list li {
  font-size: 13px;
  color: var(--xmla-text-secondary);
  padding: 5px 0 5px 20px;
  position: relative;
}

.xmla-vvc-privacy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--xmla-blue-400);
}

/* ── Buttons ────────────────────────────────────────────────── */
.xmla-vvc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border: none;
  border-radius: var(--xmla-radius-sm);
  font-family: var(--xmla-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--xmla-transition), transform var(--xmla-transition), box-shadow var(--xmla-transition);
  white-space: nowrap;
  user-select: none;
}

.xmla-vvc-btn:hover   { opacity: 0.88; transform: translateY(-1px); }
.xmla-vvc-btn:active  { opacity: 1; transform: translateY(0); }
.xmla-vvc-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.xmla-vvc-btn-primary {
  background: linear-gradient(135deg, var(--xmla-blue-500), var(--xmla-blue-800));
  color: #fff;
  box-shadow: 0 4px 20px rgba(26,115,232,0.35);
}
.xmla-vvc-btn-primary:hover {
  box-shadow: 0 6px 28px rgba(26,115,232,0.5);
}

.xmla-vvc-btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}

.xmla-vvc-btn-danger, .xmla-vvc-btn-danger:visited {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}

.xmla-vvc-btn-outline {
  background: transparent;
  color: var(--xmla-text-secondary);
  border: 1px solid var(--xmla-glass-border);
}

/* ── Type Selector ─────────────────────────────────────────── */
.xmla-vvc-type-selector {
  text-align: center;
}

.xmla-vvc-type-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.xmla-vvc-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--xmla-glass-border);
  border-radius: var(--xmla-radius-md);
  color: var(--xmla-text-primary);
  font-family: var(--xmla-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--xmla-transition), border-color var(--xmla-transition), transform var(--xmla-transition);
  min-width: 140px;
}

.xmla-vvc-type-btn:hover {
  background: rgba(26,115,232,0.12);
  border-color: var(--xmla-blue-400);
  transform: translateY(-2px);
}

.xmla-vvc-type-icon {
  color: var(--xmla-blue-400);
  display: flex;
}

/* ── Recorder UI ───────────────────────────────────────────── */
.xmla-vvc-recorder-ui {
  position: relative;
}

.xmla-vvc-recorder-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.xmla-vvc-back-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  max-width: 34px;
  max-height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--xmla-glass-border);
  color: var(--xmla-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  transition: background var(--xmla-transition), color var(--xmla-transition);
}

.xmla-vvc-back-btn:hover {
  background: rgba(255,255,255,0.15);
  color: var(--xmla-text-primary);
}

.xmla-vvc-recorder-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--xmla-text-primary);
}

.xmla-vvc-timer {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--xmla-blue-400);
  background: rgba(26,115,232,0.1);
  border: 1px solid rgba(26,115,232,0.2);
  border-radius: var(--xmla-radius-sm);
  padding: 4px 10px;
  letter-spacing: 0.5px;
}

/* ── Video Preview ─────────────────────────────────────────── */
.xmla-vvc-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--xmla-radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.xmla-vvc-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Audio Visualizer ──────────────────────────────────────── */
.xmla-vvc-audio-viz {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border-radius: var(--xmla-radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  border: 1px solid var(--xmla-glass-border);
}

.xmla-vvc-audio-viz canvas {
  display: block;
  width: 100%;
  height: 80px;
}

/* ── REC Badge ─────────────────────────────────────────────── */
.xmla-vvc-rec-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(239,68,68,0.85);
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.8px;
}

.xmla-vvc-rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: xmla-blink 1s step-start infinite;
}

@keyframes xmla-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Playback ──────────────────────────────────────────────── */
.xmla-vvc-playback {
  margin-bottom: 16px;
  text-align: center;
}

.xmla-vvc-playback video,
.xmla-vvc-playback audio {
  width: 100%;
  border-radius: var(--xmla-radius-md);
  background: #000;
  margin-bottom: 8px;
}

.xmla-vvc-preview-label {
  font-size: 12px;
  color: var(--xmla-text-muted);
  margin: 0;
}

/* ── Controls ──────────────────────────────────────────────── */
.xmla-vvc-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.xmla-vvc-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px;
  border: none;
  border-radius: var(--xmla-radius-sm);
  font-family: var(--xmla-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--xmla-transition), transform var(--xmla-transition);
  white-space: nowrap;
}

.xmla-vvc-ctrl-btn:hover   { opacity: 0.85; transform: translateY(-1px); }
.xmla-vvc-ctrl-btn:active  { transform: translateY(0); }
.xmla-vvc-ctrl-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.xmla-vvc-btn-pause {
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  color: #f59e0b;
}

.xmla-vvc-btn-stop {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}

.xmla-vvc-btn-rerecord {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--xmla-glass-border);
  color: var(--xmla-text-secondary);
}

/* ── Error ─────────────────────────────────────────────────── */
.xmla-vvc-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--xmla-radius-sm);
  padding: 12px 14px;
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 12px;
}

.xmla-vvc-error svg {
  flex-shrink: 0;
  color: #f87171;
  margin-top: 1px;
}

/* ── Contact Form ──────────────────────────────────────────── */
.xmla-vvc-form {
  border-top: 1px solid var(--xmla-glass-border);
  padding-top: 24px;
  margin-top: 8px;
}

.xmla-vvc-form-heading {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--xmla-text-secondary);
}

.xmla-vvc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .xmla-vvc-fields {
    grid-template-columns: 1fr;
  }
}

.xmla-vvc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.xmla-vvc-field-full {
  grid-column: 1 / -1;
}

.xmla-vvc-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--xmla-text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.xmla-vvc-required {
  color: var(--xmla-error);
  margin-left: 2px;
}

.xmla-vvc-field input,
.xmla-vvc-field textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--xmla-glass-border);
  border-radius: var(--xmla-radius-sm);
  padding: 10px 12px;
  color: #f1f5f9 !important;
  font-family: var(--xmla-font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--xmla-transition), background var(--xmla-transition);
  width: 100%;
}

.xmla-vvc-field input::placeholder,
.xmla-vvc-field textarea::placeholder {
  color: var(--xmla-text-muted);
}

.xmla-vvc-field input:focus,
.xmla-vvc-field textarea:focus {
  border-color: var(--xmla-blue-400);
  background: rgba(26,115,232,0.06);
}

.xmla-vvc-field textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Submit Row ────────────────────────────────────────────── */
.xmla-vvc-submit-row {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 480px) {
  .xmla-vvc-submit-row {
    justify-content: center;
  }

  .xmla-vvc-submit-btn {
    width: 100%;
  }
}

.xmla-vvc-submit-btn {
  min-width: 160px;
  justify-content: center;
}

/* ── Progress ──────────────────────────────────────────────── */
.xmla-vvc-progress-wrap {
  margin-top: 16px;
  text-align: center;
}

.xmla-vvc-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}

.xmla-vvc-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--xmla-blue-500), var(--xmla-blue-300));
  border-radius: 99px;
  transition: width 0.3s ease;
}

.xmla-vvc-progress-label {
  font-size: 13px;
  color: var(--xmla-text-muted);
  margin: 0;
}

/* ── Success Card ──────────────────────────────────────────── */
.xmla-vvc-success-card .xmla-vvc-card-inner {
  text-align: center;
  padding: 56px 32px;
}

.xmla-vvc-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(5,150,105,0.1));
  border: 1px solid rgba(16,185,129,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--xmla-success);
  animation: xmla-pop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes xmla-pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Disabled fallback ─────────────────────────────────────── */
.xmla-vvc-disabled {
  text-align: center;
  color: var(--xmla-text-muted);
  padding: 24px;
}

/* ================================================================
   ADMIN STYLES
   ================================================================ */

.xmla-vvc-admin-wrap {
  background: transparent;
}

.xmla-vvc-admin-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 24px;
}

.xmla-vvc-count {
  background: #1a73e8;
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

/* Filter tabs */
.xmla-vvc-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.xmla-vvc-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 160ms, border-color 160ms;
  margin-bottom: -1px;
}

.xmla-vvc-tab:hover        { color: #1e293b; }
.xmla-vvc-tab-active       { color: #1a73e8; border-bottom-color: #1a73e8; font-weight: 600; }

/* Table */
.xmla-vvc-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.xmla-vvc-table {
  width: 100%;
  border-collapse: collapse;
}

.xmla-vvc-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.xmla-vvc-table th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  text-align: left;
}

.xmla-vvc-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: #334155;
  border-top: 1px solid #f1f5f9;
  vertical-align: middle;
}

.xmla-vvc-row {
  transition: background 140ms;
}
.xmla-vvc-row:hover { background: #fafbff; }
.xmla-vvc-row.is-new { background: #fffbf0; }

.xmla-vvc-sender-name a {
  font-weight: 600;
  color: #1a73e8;
  text-decoration: none;
}
.xmla-vvc-sender-name a:hover { text-decoration: underline; }

/* Badges */
.xmla-vvc-status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.xmla-vvc-status-badge.new      { background: #fef3c7; color: #92400e; }
.xmla-vvc-status-badge.reviewed { background: #dcfce7; color: #166534; }

.xmla-vvc-type-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.xmla-vvc-type-audio { background: #dbeafe; color: #1e40af; }
.xmla-vvc-type-video { background: #ede9fe; color: #5b21b6; }

/* Actions */
.xmla-vvc-actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  align-items: center;
}

.xmla-vvc-action-btn {
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  display: inline-block;
  transition: background 140ms;
  font-family: inherit;
}

.xmla-vvc-action-btn:hover { background: #e2e8f0; color: #1e293b; }
.xmla-vvc-action-btn.xmla-vvc-btn-danger { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.xmla-vvc-action-btn.xmla-vvc-btn-danger:hover { background: #fca5a5; }

/* Pagination */
.xmla-vvc-pagination {
  margin-top: 20px;
  display: flex;
  gap: 4px;
}

.xmla-vvc-pagination .page-numbers {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.xmla-vvc-pagination .current {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

/* Empty state */
.xmla-vvc-empty {
  text-align: center;
  padding: 64px 24px;
  color: #94a3b8;
}

/* ── Single message ─────────────────────────────────────────── */
.xmla-vvc-single-header {
  margin-bottom: 8px;
}

.xmla-vvc-back-link {
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.xmla-vvc-back-link:hover { color: #1a73e8; }

.xmla-vvc-single-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .xmla-vvc-single-grid { grid-template-columns: 1fr; }
}

.xmla-vvc-admin-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
}

.xmla-vvc-admin-card h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.xmla-vvc-detail-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
}

.xmla-vvc-detail-list dt {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.xmla-vvc-detail-list dd {
  font-size: 13px;
  color: #334155;
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
  word-break: break-word;
}

.xmla-vvc-admin-player-wrap {
  margin-bottom: 16px;
}

.xmla-vvc-admin-note {
  font-size: 12px;
  color: #94a3b8;
  margin: 8px 0 0;
}

.xmla-vvc-admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

/* ── Settings page ──────────────────────────────────────────── */
.xmla-vvc-settings-form .submit {
  margin-top: 16px;
}

.xmla-vvc-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .xmla-vvc-settings-grid { grid-template-columns: 1fr; }
}

.xmla-vvc-settings-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
}

.xmla-vvc-settings-section h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}
