/* ==========================================================================
   HindiMHelp.com - Live Multi-Device & SEO Preview System Stylesheet
   ========================================================================== */

:root {
  --preview-bg: #0F172A;
  --preview-card: #1E293B;
  --preview-border: #334155;
  --preview-text: #F8FAFC;
  --preview-muted: #94A3B8;
  --preview-accent: #00417C;
  --preview-accent-orange: #FF6B00;
  --preview-green: #10B981;
  --preview-yellow: #F59E0B;
  --preview-red: #EF4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.preview-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--preview-bg);
  color: var(--preview-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header & Controls Bar */
.preview-topbar {
  background: var(--preview-card);
  border-bottom: 1px solid var(--preview-border);
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.preview-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: #FFFFFF;
}

.preview-brand .badge {
  background: linear-gradient(135deg, var(--preview-accent), var(--preview-accent-orange));
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-selectors {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 480px;
}

.preview-select {
  background: var(--preview-bg);
  color: var(--preview-text);
  border: 1px solid var(--preview-border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
  outline: none;
}

.preview-select:focus {
  border-color: var(--preview-accent-orange);
}

/* Device Viewport Buttons */
.device-toggles {
  display: flex;
  align-items: center;
  background: var(--preview-bg);
  border: 1px solid var(--preview-border);
  border-radius: 8px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.device-btn {
  background: transparent;
  color: var(--preview-muted);
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.device-btn:hover {
  color: #FFFFFF;
}

.device-btn.active {
  background: var(--preview-accent);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 65, 124, 0.4);
}

.device-btn svg {
  width: 15px;
  height: 15px;
}

.quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-open-tab {
  background: var(--preview-accent-orange);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-open-tab:hover {
  opacity: 0.9;
}

.btn-toggle-seo {
  background: #334155;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-toggle-seo:hover {
  background: #475569;
}

/* Main Workspace Layout */
.preview-workspace {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Stage Area with Device Frame */
.preview-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 1rem 2rem;
  overflow-y: auto;
  background: #090D16;
  min-height: calc(100vh - 65px);
}

.viewport-info {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--preview-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.viewport-badge {
  background: #1E293B;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  color: #38BDF8;
  font-family: monospace;
}

/* Device Mockup Shell */
.device-shell {
  background: #000000;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: width 0.3s ease, height 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.device-shell.mobile {
  border-radius: 40px;
  border: 10px solid #1E293B;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 0 2px #334155;
}

.device-shell.tablet {
  border-radius: 24px;
  border: 12px solid #1E293B;
}

.device-shell.desktop {
  border-radius: 10px;
  border: 4px solid #1E293B;
}

.device-shell.fullpage {
  border: none;
  border-radius: 0;
  width: 100% !important;
  max-width: 100% !important;
}

/* Mobile Notch / Speaker bar */
.device-notch {
  display: none;
  height: 24px;
  background: #1E293B;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.device-shell.mobile .device-notch {
  display: flex;
}

.notch-pill {
  width: 90px;
  height: 12px;
  background: #090D16;
  border-radius: 10px;
}

/* Iframe */
.preview-iframe {
  width: 100%;
  height: 800px;
  border: none;
  background: #FFFFFF;
  display: block;
  transition: height 0.2s ease;
}

/* Side SEO & Meta Inspector Drawer */
.seo-panel {
  width: 440px;
  background: var(--preview-card);
  border-left: 1px solid var(--preview-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: -5px 0 25px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, margin-right 0.3s ease;
}

.seo-panel.collapsed {
  margin-right: -440px;
  transform: translateX(100%);
}

.seo-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--preview-border);
  margin-bottom: 1.25rem;
}

.seo-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Google Search Snippet Simulation */
.google-preview-card {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  font-family: Arial, sans-serif;
}

.google-url-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: #202124;
  margin-bottom: 4px;
}

.google-favicon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00417C;
  color: #FFFFFF;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.google-domain {
  font-weight: 500;
  color: #202124;
}

.google-breadcrumb {
  color: #5F6368;
}

.google-title {
  color: #1A0DAB;
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 4px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 400;
  display: block;
}

.google-title:hover {
  text-decoration: underline;
}

.google-snippet {
  color: #4D5156;
  font-size: 13px;
  line-height: 1.45;
}

/* Metric / Checks Cards */
.seo-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--preview-bg);
  border: 1px solid var(--preview-border);
  border-radius: 8px;
  padding: 0.75rem;
}

.metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--preview-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 0.25rem;
}

.metric-value.good {
  color: var(--preview-green);
}

.metric-value.warn {
  color: var(--preview-yellow);
}

/* Checklist Items */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.checklist-item {
  background: var(--preview-bg);
  border: 1px solid var(--preview-border);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 1px;
}

.check-icon.pass {
  background: rgba(16, 185, 129, 0.2);
  color: var(--preview-green);
  border: 1px solid var(--preview-green);
}

.check-icon.info {
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
  border: 1px solid #38BDF8;
}

/* Meta Data Key-Value Table */
.meta-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.meta-table tr {
  border-bottom: 1px solid var(--preview-border);
}

.meta-table th {
  text-align: left;
  padding: 0.5rem 0.25rem;
  color: var(--preview-muted);
  width: 110px;
  font-weight: 600;
}

.meta-table td {
  padding: 0.5rem 0.25rem;
  color: var(--preview-text);
  word-break: break-all;
  font-family: monospace;
}

@media (max-width: 900px) {
  .seo-panel {
    position: fixed;
    right: 0;
    top: 60px;
    height: calc(100vh - 60px);
    z-index: 105;
  }
}
