/* =========================================================
   MagicBotz • Unified Light Theme — /digitaltwin/style.css
   Mobile-first, responsive, and consistent across all pages
   ========================================================= */

/* -------- Reset & Base -------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
  /* Palette (soft light) */
  --bg: #f7f8fa;
  --input-bg: #fefefe;
  --surface: #ffffff;
  --surface-2: #f3f5f7;
  --text: #1f2937;
  --text-soft: #667085;
  --text-mid: #8c8d8f;
  --text-light: #b6b6b6;
  --muted: #98a2b3;
  --border: #e5e7eb;
  --btntext:rgb(58, 83, 83);
  --accent0:#fff5e8d8;
  --accent1: #ffc374;
  --accent2: #Fd9715;
  --button-text: #2d3f52;
  --button-bg: #f3f3f377;
  --button-hover:#ff7300;
  --button-hover-text:#ff7300;
  --toast-sucsess:#37c5a2c0;
  --chart-lines:#ff7300;


  /* Brand accents (greens & neutrals in your files) */
  /* --brand: #10a37f;
  --brand-600: #109676; */

--brand: #Fd9715;
--brand-600: #ff9100;
  --brand-50: #f1f7ff94;
  --info: #3a7bd5;
  --danger: #e6664fd8;
  --danger-50: #fde9e6;
  --warning: #ffb020;

  /* Shadows */
  --shadow-xs: 0 1px 1px rgba(58, 65, 78, 0.377);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 6px 18px rgba(16, 24, 40, 0.12);

  /* Radius */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 60px;
  /* Sizing */
  --container-w: 720px;

  /* Transitions */
  --t-fast: 120ms ease;
  --t: 200ms ease;

  /* Typography */
  --font: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}


/* -------- Fixed header + safe page offset -------- */
:root { --header-h: 64px; }

@media (max-width: 480px){
  :root { --header-h: 56px; }
}



/* Make sure the document starts below the fixed header */
html, body { height: 100%; }
body { 
  margin: 0;
  /* Offset content by header height + iOS safe area if present */
  /* padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); */
}

/* Optional: constrain/size header elements */
.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { height: calc(var(--header-h) - 28px); width: auto; vertical-align: middle;}
.header-title { font-weight: 600; color: var(--text); }

/* User menu positioning so it drops over the page, not pushing layout */
.user-menu { position: relative; }
.user-avatar {height: calc(var(--header-h) - 18px); width: auto; border-radius: 50%; cursor: pointer; transition: transform 0.2s ease;vertical-align: middle;}
.user-avatar:hover { transition: transform 0.2s ease; border: 2px solid var(--brand);}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16,24,40,.12);
  padding: 8px;
}
.user-dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.user-dropdown a:hover { background: var(--bg);  text-decoration: none;}

/* If your header was previously sticky, remove that style */

html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%;  }

/* Links */
a { color: var(--text-soft); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; }

/* Headings & text */
h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; }
h1 { font-size: clamp(22px, 2.5vw, 28px); font-weight: 700; }
h2 { font-size: clamp(18px, 2vw, 22px); font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; color: var(--text-soft); }
p  { margin: 8px 0 18px; color: var(--text);   font: 100 14px/1.4 var(--font);}

/* -------- Layout Wrappers -------- */
.form-container {
  width: 100%;
  max-width: var(--container-w);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(16px, 3vw, 28px);
  margin: 16px auto;
  text-align: center; 
  margin-top: 80px;
}
  /* Section titles */
    .section-title {
      font-weight: 700;
      font-size: 18px;
      margin-top: 40px;
      margin-bottom: 10px;
    }

/* Optional app header if present */
.app-header, header.app-header {
    position: fixed;
    top: 0;
    left:0;
    right:0;
    z-index: 50;
    background: var(--surface);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: var(--shadow-sm);
    margin: 0;
}

/* -------- Inputs -------- */
input, select, textarea {
  width: 100%;
  font: 300 14px/1.4 var(--font);
  color: var(--text-soft);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  margin-bottom: 10px;
}
input::placeholder, textarea::placeholder { color: var(--text-light); }
input:focus, select:focus, textarea:focus {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--button-bg);
}
textarea { resize: vertical; min-height: 96px; }
.createCategory {
cursor: pointer;
  transition: all 0.2s ease;
}
/* Inline helper rows */
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px){ .field-row { grid-template-columns: 1fr; }}

/* -------- Buttons (unified) -------- */
button { 
    font: 600 16px var(--font);
    cursor: pointer;
    border-radius: var(--r-xl);
    border: 0px solid #00000014;
    transition: transform var(--t-fast), background var(--t), color var(--t), border-color var(--t);
    margin: 10px 0;
    background-color: var(--button-bg);
    /* color: var(--btntext); */
    color:var(--button-text);
    box-shadow:var(--shadow-xs);
      
}

button:hover{

  color: var(--button-hover-text);
}

button:disabled { opacity: .6; cursor: not-allowed; }

/* Primary (main-btn-00) */
.main-btn-00, .btn-primary {
  width: 50%; padding: 12px 14px;
 

}
.main-btn-00:hover, .btn-primary:hover { transform: translateY(-1px); }

/* Neutral (main-btn-01) */
.main-btn-01, .btn-neutral {
 width: 50%; padding: 12px 14px;

}
.main-btn-01:hover, .btn-neutral:hover {  transform: translateY(-1px); }

/* Danger (main-btn-02) */
.main-btn-02, .btn-danger {
  width: 50%; padding: 12px 14px;

}
.main-btn-02:hover, .btn-danger:hover {transform: translateY(-1px); }

/* Info/Blue action (btn-edit-0) */
.btn-edit-0, .btn-info {
  width: auto; padding: 12px 14px;
  width: 50%;
}
.btn-edit-0:hover, .btn-info:hover { transform: translateY(-1px); }

/* Accent (main-btn-04) */
.main-btn-04 { width: auto; padding: 12px 14px; border: 1px solid; }
.main-btn-04:hover {transform: translateY(-1px); }

/* Utility row for button groupings */
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.publish-actions { display: flex; gap: 10px; margin-top: 14px; }

/* -------- Cards & Grids -------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  padding: 16px;
  margin-bottom: 10px;
}

.card p {
overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  display: box;
  -webkit-line-clamp: 1;
  line-clamp: 1; /* ✅ Standard property for cross-browser support */
  -webkit-box-orient: vertical;
  box-orient: vertical;
  font-size: 14px;
  line-height: 1.4;
  margin: 6px 0 8px;
}
.card h3 {
color: #000;
 
}

.dashboard-container { margin-top: 14px; }

/* Dashboard Buttons */
.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin-bottom: 16px;
}

.twins-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.twin-card .card-actions { display: flex; gap: 10px; margin-top: 12px; }
/* --- Individual Twin Cards --- */
.twin-card {
  border-radius: 10px;
  padding: 16px;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;

  overflow-wrap: anywhere;
    box-shadow: var(--shadow-sm);
}

.twin-card:hover {
  transform: translateY(-3px);

}
small {
  color:var(--text-mid);
  font-size: 12px;
}

/* Share/chat icons in twin status bar */
.share-icon { width: 28px; height: 28px; margin-left: 8px; cursor: pointer; transition: transform var(--t-fast), opacity var(--t-fast); vertical-align: middle; }
.share-icon:hover { transform: translateY(-1px); opacity: .85; }

/* -------- Status Pills / Bars -------- */
.twin-status-bar {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.status {
  width:fit-content;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft);
}
.status.published { background: var(--brand-50); color: var(--accent2); border-color:  var(--accent1); }
.status.draft { background: #e2e2e2c2; color: #535966; }

/* -------- Tiles (plans, voices, themes) -------- */
.tile-grid {
  margin-top: 20px;
  margin-bottom: 40px;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.tile, .voice-tile, .voice-name-tile {
  position: relative;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  color: var(--text);
  cursor: pointer;
  transition: transform var(--t), border-color var(--t), background var(--t);
  user-select: none;
  min-height: 56px;
  display: flex; align-items: center; justify-content: flex-start;
}

.Subscriptiontile {
  position: relative;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  color: var(--text);
  cursor: pointer;
  transition: transform var(--t), border-color var(--t), background var(--t);
  user-select: none;
  min-height: 56px;
  display: flex; 
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
}

.tile:hover, .voice-tile:hover, .voice-name-tile:hover { transform: translateY(-2px); border-color: var(--brand); }
.tile.active, .voice-tile.active, .voice-name-tile.active { background: var(--brand-50); border-color: var(--brand); }

/* Alternate grid (older pages) */
.tile-grid-container { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* -------- Branding upload (publish) -------- */
.branding-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.upload-box h3 { margin-bottom: 8px; }
.upload-area {
  background: #f8fafc; border: 1px dashed var(--border); border-radius: var(--r-md);
  padding: 16px; text-align: center; cursor: pointer; transition: border-color var(--t), background var(--t);
}
.upload-area:hover { border-color: var(--brand); background: #f4fbf8; }
.preview-img { 
box-shadow: var(--shadow-xs); 
max-height: 52px;
max-width:100px;
margin-right: auto;
object-fit: cover;
box-shadow: var(--shadow-sm);
border: 1px solid var(--border);
padding: 2px;
border-radius: var(--r-sm);
 transition: border-color var(--t), background var(--t);
}
.preview-img:hover {border-color: var(--brand); background:#f4fbf8; transform: translateY(-1px);}

/* -------- Quick Manager composer -------- */
.add-post-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.textarea-wrapper { position: relative; }
.char-counter {
  position: absolute; top: 8px; right: 10px;
  font-size: 12px; color: #9aa3af;
}
/* "Add as" section */
.add-as-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  margin-left: 2px;
  overflow-x: auto;
  padding-bottom: 10px;
    scroll-behavior: smooth;
}

.add-as-bar::-webkit-scrollbar {

  height: 6px;
}
.add-as-bar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.add-as-label {
  font-size: 13px;
  color: #777;
  margin-left: 5px;
}

.bubble {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px; font-size: 13px;
  border-radius: 999px; border: 1px solid var(--border);
  background: #f6f8fb; color: var(--text);
  cursor: pointer; transition: background var(--t), border-color var(--t), color var(--t);
  user-select: none;
}
.bubble:hover { border-color: var(--brand); }
.bubble.active { background: var(--brand-50); color: var(--brand); border-color: var(--brand); }
.bubble-group {
  display: flex;
  gap: 6px;
    
}
.post-action-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 10px;
}
.upload-icon-btn { display: inline-flex; align-items: center; justify-content: center; 
  padding: 8px; border: 1px solid var(--border); border-radius: var(--r-sm); height: 50px; min-width: 48px;
  background: #f8fafc; cursor: pointer; transition: border-color var(--t), background var(--t), transform var(--t-fast); }
.upload-icon-btn:hover { border-color: var(--brand); background:#f4fbf8; transform: translateY(-1px); }

.add-btn { width: 120px; }

.upload-icon-img {
  

  opacity: 0.8;
}
/* Twin selector scroller */

/* === Quick Manager Avatar Scroll === */
.twin-scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 8px 10px 10px 12px;
  scroll-behavior: smooth;

  margin-bottom: 10px;
}

.twin-scroll-container::-webkit-scrollbar {
  height: 6px;
}
.twin-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}


/* Image preview area */
#imagePreviewContainer { margin-top: 10px; }
#imagePreviewContainer.hidden { display: none; }

/* -------- Reports: summary bar -------- */
.summary-bar {
  margin: 10px 0 16px;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.summary-card {
  background: var(--brand-50);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  /* box-shadow: var(--shadow-xs); */
  padding: 12px;
}
.summary-title { font-size: 12px; color: var(--text-soft); }
.summary-value { font-size: 18px; font-weight: 700; color: var(--text); }

/* -------- Progress (signup/verify, publish) -------- */
.progress-container {
  width: 100%; height: 18px; background: #eef2f6; border-radius: var(--r-sm);
  overflow: hidden; margin: 12px 0 16px; border: 1px solid var(--border);
}
.progress-bar {
  height: 100%; min-width: 8%;
  background: linear-gradient(90deg, var(--brand), #12b07f);
  color: #0f172a; font-size: 11px; font-weight: 700; text-align: center; line-height: 14px;
  border-radius: var(--r-sm);
  transition: width 0.35s ease;
  padding: 0 4px;
}

/* Publish steps list */
.publish-steps { list-style: none; margin: 0; padding: 0; }
.publish-steps li {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 8px; border: 1px dashed var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; background: #fafcff; margin-bottom: 8px;
}
.publish-steps li .subtasks { list-style: none; margin: 8px 0 0; padding-left: 14px; grid-column: 1 / -1; color: var(--text-soft); font-size: 13px; }
.publish-steps li.pending span { color: var(--text-soft); }
.publish-steps li.success { border-style: solid; background: #f2fcf7; }

/* -------- Toasts -------- */
.toast {
  position: fixed; z-index: 1000;
  left: 50%; transform: translateX(-50%);
  bottom: 28px; min-width: 220px; max-width: 90%;
  background: var(--text-soft); color: #fff;
  padding: 12px 16px; border-radius: var(--r-sm);
  box-shadow: var(--shadow-md); text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t), bottom var(--t);
}
.toast.show { opacity: 1; pointer-events: auto; bottom: 40px; }
.toast.success { background:var(--toast-sucsess);}
.toast.error { background: var(--danger); }
.toast.info  { background: var(--info); }

/* -------- Loader overlay -------- */
.loader-overlay {
  padding: 30px;
  position: fixed; inset: 0; z-index: 999;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(2px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity var(--t);
  text-align: center;
}
.loader-overlay.hidden { opacity: 0; pointer-events: none; }
.loader {
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid #eef2f6; border-top-color: var(--brand);
  animation: spin 1s linear infinite; margin-bottom: 10px;
}
.loader-text { color: var(--text-soft); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); }}

/* -------- Modal -------- */
.modal {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.38);
  padding: 16px;
}
.modal:not(.hidden) { display: flex; }
.modal.hidden { display: none; }
.modal-content {
  width: min(100%, 920px);
  max-height: min(86vh, 900px);
  overflow: auto;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: clamp(14px, 2.6vw, 24px);
}
.btn-close { margin-top: 12px; }

/* -------- Misc/Utilities -------- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }

/* -------- Responsive Tweaks -------- */

@media (max-width: 540px){
  .button-row, .publish-actions { flex-direction: column; }
  .main-btn-00, .main-btn-01, .main-btn-02 { width: 100%; }
  .share-icon { width: 26px; height: 26px; }
}

/* Footer Links */
.form-footer {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.form-footer a {

  font-size: 14px;
  text-decoration: none;
}
.form-footer a:hover {

  text-decoration: underline;
}
.toggle-link {
  font-weight: 600;
  text-decoration: none;
  margin-left: 6px;
  cursor: pointer;
}

.toggle-link:hover {
  text-decoration: underline;
}

.round-border {
 
  border-radius: 50%;
  padding: 1px;              /* space inside circle */
  display: inline-flex;      /* centers the image nicely */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  margin-right: 10px;
  height: 30px; 
  margin-bottom: -10px;
}
.round-border:hover {
 
  transform: scale(1.15);
}
.toggle-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  margin-top: 8px;
  padding-left: 12px;
  padding-right: 10px;
  border-left: 3px solid var(--brand);
  background: #fbfbfb;
  border-radius: 16px;
}

.toggle-section.open {
  /* allow smooth expansion to actual height */
  max-height:800px; /* any large enough value */
  overflow-y: auto;
}
.separator {
  display: flex;
  align-items: center;
  text-align: center;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #000;
}

.separator:not(:empty)::before {
  margin-right: .25em;
}

.separator:not(:empty)::after {
  margin-left: .25em;
}
.twin-header-inputs label {
  display: block;
  font-weight: 400;
  margin-bottom: 6px;
  margin-left: 5px;
  font-size: 15px;
}
.twin-header-inputs input,
.twin-header-inputs textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
}
.slug-input-container {
  position: relative;
  display: flex;
  align-items: center;
   max-width: 300px;
}

#twinSlug {
  flex: 1;
  padding-right: 90px;
  font-size: 15px;
  margin: 0px;
 
}

.form-container h3{
  margin-bottom: 20px;
  margin-top: 20px;
}
.tile .info-icon {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 13px;
  cursor: pointer;

  opacity: 0.7;

  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}

.tile .info-icon:hover {
  opacity: 1;

  transform: scale(1.05);
}
.tooltip-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
background:  var(--surface);
  border-radius: 10px;
border: 1px solid;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  z-index: 999;
  display: none;
  text-align: left;
}
.tooltip-box p {
  font-size: 15px;

  margin-bottom: 16px;
}
.tooltip-close {

  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.tooltip-overlay {
  position: fixed;
  inset: 0;

  z-index: 998;
  display: none;
}
.question-title{
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-left: 5px;
  margin-top: 40px;
  margin-bottom: 10px;
}
/* Ensure text never overlaps the icon */
.tile-text {
    font-size:14px;
  display: inline-block;
  margin-right: 24px;
  word-wrap: break-word;
  flex: 1;
}



    .upload-box {
  text-align: center;
}
#voiceTiles,
#voiceNameTiles,
#themeTiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

#voiceTiles .tile,
#voiceNameTiles .tile,
#themeTiles .tile {
  min-width: 140px;
  text-align: center;
        font-size:14px;
}
    .voice-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    #testPlayer {
      width: 100%;
      margin-top: 10px;
    }


.twin-scroll-item {
  flex: 0 0 auto;
  text-align: center;
  width: 70px;
  cursor: pointer;
  user-select: none;
}

.twin-scroll-item img:hover {
  border: 2px solid var(--accent1);
  box-shadow: 0 0 6px var(--accent2);
  transform: scale(1.05);
}

.twin-scroll-item img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all 0.2s ease-in-out;
}

.twin-scroll-item.active img {
  border: 2px solid var(--accent1);
  box-shadow: 0 0 6px var(--accent2);
  transform: scale(1.05);
}

.twin-scroll-item span {
  display: block;

  font-size: 12px;
  color: var(--text, #555);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.slug-status {
  position: absolute;
  right: 12px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.slug-status.ok {
  color: var(--toast-sucsess); /* green */
  font-weight: 600;
}

.slug-status.error {
  color: var(--danger); /* red */
  font-weight: 600;
}

.slug-status {
  margin-left: 6px;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

/* --- Steps List --- */
.publish-steps {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  padding-right: 10px;
}

.publish-steps li {
  background: var(--list-bg);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  border-left: 4px solid var(--platinum);
  transition: border-color 0.3s ease;
  font-size: 14px;
}

.publish-steps li.pending { border-left-color: var(--custom-color-13); }
.publish-steps li.in-progress { border-left-color: var(--green-web); }
.publish-steps li.completed { border-left-color: var(--custom-color-38); }
.publish-steps li.failed { border-left-color: var(--custom-color-39); }

.publish-steps li span {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 4px;
}

.publish-steps li small {
  float: right;
  font-size: 13px;
  color: var(--text);
}

.subtasks {
  list-style: none;
  padding-left: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* --- Progress Bar --- */
.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--status-bg);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 12px;
  margin-bottom: 20px;
}

.progress-bar-inner {
  height: 100%;
  width: 0%;
  background-color: var(--green-web);
  transition: width 0.3s ease;
}

ul#publishStepList {
    padding: 0;
}
.post-content-wrapper {
  display: flex;
  align-items:flex-start;
  gap: 10px;
}


.post-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 3px rgba(0,0,0,0.1);
}

.post-text-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 25px;
}

.post-text {
  margin: 0;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  margin-bottom: 8px;
}


.delete-btn{
  max-width:fit-content;
  background: none;
  background-color: #ffffff00;
}

.delete-btn:hover{
  transform: scale(1.5);
  opacity: 0.8;
  background: none;
    background-color: #ffffff00;
}

.qr-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.qr-modal-content {
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  margin-top: 70px;
}
.qr-close {
  position: absolute;
  right: 10px;
  top: 5px;
  font-size: 22px;
  cursor: pointer;
}
.qr-wrapper {
  position: relative;
  width: 340px; /* Adjust as needed */
  height: 340px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-ring {
  position: absolute;
  width: 330px;
  object-fit: contain;
  pointer-events: none; /* allows scanning the QR easily */
  z-index: 1;
  background-color: var(--brand);
   border-radius: 50%;
 clip-path: circle(48.5%);
 background-image: radial-gradient(#ffffff 4px, transparent 7px);
  background-size: 8px 20px;

}

#qrCodeContainer {
  position: relative;
  z-index: 2;
  background: transparent;
}

.page-container {
  padding-top: 70px; /* Space for header */
  text-align: center;
    color: var(--oxford-blue);
}

/* Search Panel */
.search-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.6s ease;
}

.search-panel.centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.search-panel.top-fixed {

  top: 70px;
  background: var(--bg);
  padding: 10px 0 15px;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.search-bar select {
  width: 180px;
}
/* Continue Bar */
.continue-bar {
position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--border);
  border-top: 1px solid #ddd;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}



.no-results {
  text-align: center;
  color: #666;
  font-size: 15px;
  grid-column: 1 / -1;
}

.hidden { display: none !important; }


/* Results */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 30px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.twin-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  /* object-fit: cover; */
  flex-shrink: 0;
  margin-right: 10px;
}
@media (max-width: 600px) {
  .search-panel input, .search-panel select {
    width: 85%;
  }

  
  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    padding: 15px;
  }

  .twin-avatar {
    width:100px;
    height:100px;
  }
}
#startChatBtn{
 height: 50px;
 width: 200px;
}
/* --- Selected avatars on the left --- */
.selected-avatars {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 5px;
}

.selected-avatars img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ccc;
  box-shadow: 0 0 2px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.selected-avatars img:hover {
  transform: scale(1.2);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 44px;
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  z-index: 100;
}

.user-dropdown a {
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.user-dropdown a:hover {
  background-color: var(--border);
  color: var(--brand-600);
  font-weight: 600;
}
#searchBox{
  width:auto;
  height: 50px;
}

#categorySelect{
    margin: 2px;
    margin-top: 10px;
    margin-bottom: 0px;
    width: 200px;
    height: 50px;
}
#searchBtn{

 height: 49px;
 width: 95px;
}

#showAllBtn{

 height: 49px;
 width: 95px;
}
#startChatBtn{
 height: 50px;
 width: 200px;
}
.twin-info h3 {
  margin: 0 0 4px;
  color: var(--text);
}

.twin-info .category {
  margin: 0 0 4px;
  color: var(--muted);
}

.twin-info p {
  margin: 0 0 4px;
  color: var(--text-soft);
}

/* user activity - chat history*/


/* === User Analytics Modal Layout === */
.user-analytics {
  display: flex;
  height: 55vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.user-list-panel {
  width: 30%;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 10px;
}

.chat-history-panel {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}

.user-item {

  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.user-item:hover {
  background:var(--bg);
}
.user-item.active {
  background: var(--bg);
  border-color: var(--border);
}

.chat-row {
  margin-bottom: 10px;
}
.chat-message {
  padding: 8px 10px;
  border-radius: 6px;
  max-width: 80%;
  margin: 4px 0;
}
.user-message {
  background: var(--surface-2);
  align-self: flex-start;
}
.twin-message {
  background: var(--accent0);
  align-self: flex-end;
}
#reportChart {
  width: 100% !important;
  min-height: 300px;
  max-height: 400px;
  transition: opacity 0.5s ease;
}
.separator {
  display: flex;
  align-items: center;
  text-align: center;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #000;
}

.separator:not(:empty)::before {
  margin-right: .25em;
}

.separator:not(:empty)::after {
  margin-left: .25em;
}

.btn-close {
  margin-top: 16px;
  padding: 8px 16px;
  border: none;
  background-color: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  border: 1px solid var(--border);
}

.btn-close.hidden {
  display: none;
}
/* ===========================
   Composer Lock (Option A)
=========================== */
.composer-locked {
  position: relative;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.composer-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.55);
  border-radius: var(--r-lg);
  z-index: 5;
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  text-align: center;
}

/* Ensure unlocked state becomes fully interactive */
#composerContainer:not(.composer-locked) {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

/* Disabled styles */
.upload-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.add-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.bubble-disabled {
  opacity: 0.5;
  pointer-events: none;
}
/* =========================================================
   APP-LIKE UI ENHANCEMENTS (PURE CSS)
   Drop-in additions only — no overlap with existing rules
   ========================================================= */


/* ---------------------------------------------------------
   1) Composer Unlock Animation (fade + lift + scale)
--------------------------------------------------------- */

#composerContainer {
  transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

#composerContainer:not(.composer-locked) {
  opacity: 1;
  transform: translateY(0px) scale(1);
  box-shadow: var(--shadow-sm), 0 6px 16px rgba(0,0,0,0.06);
}

#composerContainer.composer-locked {
  opacity: 0.4;
  transform: translateY(6px) scale(0.985);
  box-shadow: none;
}

.composer-locked-overlay {
  animation: fadeInOverlay 0.4s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ---------------------------------------------------------
   2) Twin Selector: Pulse + Glow + Lift on Active
--------------------------------------------------------- */

.twin-scroll-item.active img {
  animation: twinPulse 0.35s ease-out;
}

@keyframes twinPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1.03); }
}

.twin-scroll-item img {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.twin-scroll-item.active img {
  box-shadow: 0 0 8px var(--accent2);
  border-color: var(--accent1);
}


/* ---------------------------------------------------------
   3) Textarea Focus Animation (smooth grow + glow)
--------------------------------------------------------- */

#postContent:focus {
  animation: focusGrow 0.25s ease;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
}

@keyframes focusGrow {
  0%   { transform: scale(0.99); }
  100% { transform: scale(1); }
}


/* ---------------------------------------------------------
   4) Better Bubble Interaction (press + ripple + lift)
--------------------------------------------------------- */

.bubble {
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
}

.bubble:active {
  transform: scale(0.94);
}

.bubble.active {
  background: var(--brand-50);
  border-color: var(--brand);
  color: var(--brand);
  animation: bubblePop 0.25s ease;
}

@keyframes bubblePop {
  0%   { transform: scale(0.96); }
  80%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}


/* ---------------------------------------------------------
   5) Ripple Effect for Bubbles (pure CSS, no JS)
--------------------------------------------------------- */

.bubble::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
}

.bubble:active::after {
  opacity: 0.3;
  animation: ripple 0.5s ease-out;
}

@keyframes ripple {
  0%   { transform: scale(1); opacity: 0.35; }
  100% { transform: scale(14); opacity: 0; }
}


/* ---------------------------------------------------------
   6) Add Button: App-like Press & Hover
--------------------------------------------------------- */

.add-btn {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.add-btn:not(.add-disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.add-btn:not(.add-disabled):active {
  transform: scale(0.96);
}


/* ---------------------------------------------------------
   7) Image Upload Button (lift + glow)
--------------------------------------------------------- */

.upload-icon-btn {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.upload-icon-btn:not(.upload-disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.upload-icon-btn:not(.upload-disabled):active {
  transform: scale(0.96);
}


/* ---------------------------------------------------------
   8) Post Cards: Depth + Hover Elevation
--------------------------------------------------------- */

.post-card {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s ease, box-shadow 0.3s ease;
  margin-bottom: 10px;
  padding: 10px 20px 0px;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}


/* ---------------------------------------------------------
   9) Delete Icon Hover (smooth zoom)
--------------------------------------------------------- */

.delete-btn {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.delete-btn:hover {
  transform: scale(1.25);
  opacity: 0.75;
}


/* ---------------------------------------------------------
   10) Toggle Section: Slide + Fade
--------------------------------------------------------- */

.toggle-section {
  transition: max-height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}

.toggle-section.open {
  opacity: 1;
}


/* ---------------------------------------------------------
   11) Rotating Smart Placeholder (CSS-only optional)
--------------------------------------------------------- */

.placeholder-rotate span {
  position: absolute;
  opacity: 0;
  animation: placeholderCycle 12s infinite;
}

.placeholder-rotate span:nth-child(1) { animation-delay: 0s; }
.placeholder-rotate span:nth-child(2) { animation-delay: 4s; }
.placeholder-rotate span:nth-child(3) { animation-delay: 8s; }

@keyframes placeholderCycle {
  0%   { opacity: 0; transform: translateY(6px); }
  8%   { opacity: 1; transform: translateY(0); }
  25%  { opacity: 1; }
  33%  { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 0; }
}


/* ---------------------------------------------------------
   12) Floating Add Button (FAB style — if used)
--------------------------------------------------------- */

.fab-add-btn {
  position: fixed;
  right: 20px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  transition: transform 0.25s ease, box-shadow 0.35s ease;
  z-index: 900;
}

.fab-add-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.28);
}

.fab-add-btn:active {
  transform: scale(0.92);
}
/* ===========================================================
   DIGITAL TWIN DASHBOARD — SAFE SCOPED STYLES
   =========================================================== */

.dashboard-page .dashboard-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}


.dashboard-page .twins-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-top: 10px;
}

/* Responsive — show 2 cards on larger screens */
@media (min-width: 600px) {
  .dashboard-page .twins-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Card styling */
.dashboard-page .twin-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.08),
    0 6px 14px rgba(0,0,0,0.06);
  border: 1px solid #ececec;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-page .twin-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.12),
    0 8px 24px rgba(0,0,0,0.08);
}

/* Title */
.dashboard-page .twin-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #2f2f2f;
}

/* Description */
.dashboard-page .twin-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  min-height: 42px;
}



/* Status row */
.dashboard-page .twin-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 6px;
}

/* Icons row */
.dashboard-page .share-icon {
  height: 26px;
  margin-right: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.dashboard-page .share-icon:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

/* Actions (Edit / Publish) */
.dashboard-page .card-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

/* Edit button */




/* QR Modal Enhancements */
.dashboard-page .qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.25s ease;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
/* Highlight current active plan */
.tile.current-plan {
  border: 2px solid #00a15e;
  background: rgba(0, 161, 94, 0.1);
  box-shadow: 0 0 14px rgba(0, 161, 94, 0.35);
}

/* Disabled plan tile */
.tile.disabled-plan {
  opacity: 0.45;
  pointer-events: none;
}

/* Action button under current plan */
.current-plan-label {
  background: #00a15e;
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  display: inline-block;
  margin-bottom: 10px;
}
