/* ========================
   Global & Typography
======================== */
html body {
  font-family: 'Inter', sans-serif;
  height: 100vh;          /* make sure body stretches full height */
  margin: 0;             /* reset default margins */
  display: flex;
  flex-direction: column;
  background-color: #F7F8FA; /* light */
  color: #1f2937;
 
  
}
a {
  text-decoration: none !important;
  color: inherit !important;  /* takes text color from parent */
}
body.dark-mode {
  background-color: #121212; /* dark */
  color: #e5e7eb;
}
main {
  flex: 1;      
           /* this makes the content area take all free space */
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}



/* ========================
   Brand Colors
======================== */
:root {
  --primary: #4CAF50;
  --primary-hover: #43a047;
  --secondary: #3b82f6;
  --danger: #dc2626;
  --warning: #f97316;
  --info: #3b82f6;
  --light-bg: #f8fafc;
  --dark-bg: #121212;
  --light-card: #ffffff;
  --dark-card: #1e1e1e;
  --text-light: #1f2937;
  --text-dark: #e5e7eb;
  --muted-light: #6b7280;
  --muted-dark: #9ca3af;
  --border-light: #e5e7eb;
  --border-dark: #374151;
  --card-bg:#F1EEED;
  --card-bg-dark:#1A1A1A;
}

/* ========================
   Buttons
======================== */
.button-primary-custom {
  background-color: #90b956;
  border-color: #90b956;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}
.button-primary:hover {
  background-color: #90b956;
  border-color: #90b956;
}
.buton-danger {
  background-color: var(--danger);
  border-color: var(--danger);
}

/* ========================
   Avatars
======================== */
.avatar{
  width:96px;
  height:96px;
}

/* ========================
   Icons
======================== */

.icon-custom{
  font-size: 1.2rem;
  vertical-align: middle;
  color: var(--muted-light);
  
}
.icon-custom:hover{
  color: var(--text-light);
  border: 1px solid var(--border-light);
  border-radius: 0.25rem;
  background-color: var(--warning);
}
body.dark-mode .icon-custom{
  color: var(--muted-dark);
}

/* ========================
   Drag and Drop Cursor
======================== */
/* Draggable handle */
.dragger {
  cursor: grab;
  cursor: -webkit-grab;   /* Safari */
  user-select: none;
  -webkit-user-select: none;
}

.dragger:active {
  cursor: grabbing;
  cursor: -webkit-grabbing; /* Safari */
}
/* While dragging */
tr.dragging .dragger {
  cursor: grabbing!important;
  cursor: -webkit-grabbing; /* Safari */
}


/* ========================
   Cards
======================== */
.card-custom {
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
  background-color: #F8F6F5;
  
}
body.dark-mode .card-custom {
  background-color: var(--dark-card);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.card-custom-link{
  background: #fff;
      border-radius: 0.5rem;
      padding: 1.5rem;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
      width: 100%;
      max-width: 500px;
}

/* ========================
   Navbar
======================== */
.navbar {
  /* background-color: var(--light-card); */
  border-bottom: 1px solid var(--border-light);
}
body.dark-mode .navbar {
  background-color: var(--dark-card);
  border-bottom: 1px solid var(--border-dark);
}
.nav-link {
  color: var(--muted-light) !important;
}
.nav-link.active, 
.nav-link:hover {
  color: var(--text-light) !important;
}
body.dark-mode .nav-link {
  color: var(--muted-dark) !important;
}
body.dark-mode .nav-link.active, 
body.dark-mode .nav-link:hover {
  color: var(--text-dark) !important;
}


/* ========================
   Dropdowns
======================== */
.dropdown-menu {
  background-color: #F8F6F5!important;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;

}
.dropdown-menu .dropdown-item:hover {
  
  background-color: #90b956;
  color: white!important;
}


/* ========================
   Forms
======================== */
.form-control {
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
  background-color: #f9fafb;
  color: var(--text-light);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}
body.dark-mode .form-control {
  background-color: #1e1e1e;
  border-color: var(--border-dark);
  color: var(--text-dark);
}

/* ========================
   Create Link Modal
======================== */
/* Center text vertically inside the input */
.input-group .form-control {
  display: flex;
  align-items: center;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  height: 42px; /* adjust if your design uses a different height */
  line-height: 1.5;
}

/* Optional: align the emoji icon perfectly too */
.emoji-picker-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 80%;
 
}


/* ========================
   Aside Phone Menu
======================== */
/* Make the sidebar container allow sticky behavior */
aside {
  display: flex;
  position: relative;
  height: 100vh;
}

/* The sticky container */
.sticky-preview-wrapper {
  position: fixed; 
  margin-top: 40px; 
  margin-left: 150px;
  height: calc(100vh - 40px); 
  display: flex; /* align-items: center; */ 
  
  justify-content: center;
}

/* The live profile preview uses the shared .preview-frame pattern further
   down; see .preview-frame--live. */
/* Phone frame styling */
.phone-frame { 
  width: 380px; 
  height: 740px; 
  border-radius: 2rem; 
  background-color: var(--light-card); 
  display: flex; 
  flex-direction: column; /* Enables top + bottom layout */ 
  justify-content: space-between; 
  overflow: hidden; }

  .public-phone{
    margin: auto; 
    width: 570px; 
    height: 95vh; 
    border-radius: 40px;
  }
/* ========================
   Avatars
======================== */
.avatar {
  border-radius: 50%;
  object-fit: cover;
}

/* ========================
   Table Styling
======================== */
.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted-light);
}
.table td {
  vertical-align: middle;
  color: var(--text-light);
}
body.dark-mode .table th {
  color: var(--muted-dark);
}
body.dark-mode .table td {
  color: var(--text-dark);
}

/* ========================
   Error / 404 Page
======================== */
.error-container {
  text-align: center;
  max-width: 600px;
  margin: auto;
  padding: 2rem;
}
.error-code {
  font-size: 7rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.error-message {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--muted-light);
}
body.dark-mode .error-message {
  color: var(--muted-dark);
}

/* ========================
   QR Code Modal
======================== */
.qr-modal {
  background-color: var(--light-card);
  border-radius: 0.5rem;
  padding: 1.5rem;
}
body.dark-mode .qr-modal {
  background-color: var(--dark-card);
}
.qr-code {
  width: 100%;
  border-radius: 0.25rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* ========================
   Analytics Dashboard
======================== */
.stats-card {
  padding: 1rem;
  border-radius: 0.5rem;
  background: var(--light-card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
body.dark-mode .stats-card {
  background: var(--dark-card);
  color: var(--text-dark);
}
.chart-container {
  position: relative;
  height: 300px;
}

/* ========================
   Floating Action Button
======================== */
.fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--danger);
  color: #fff;
  border-radius: 0.5rem;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.2);
  text-decoration: none;
  font-weight: 600;
}
.fab:hover {
  opacity: 0.9;
  text-decoration: none;
  color: #fff;
}


/* ========================
   Index/CTA Section
======================== */

.hero-section {
  display: flex;
  /* align-items: center; */
  justify-content: space-evenly;
  margin-top: 10rem;
  padding-top: 0!important;
  min-height: 75vh;
}

.hero-section .container {
  max-width: 1500px;
  width: 100%;
  margin: 0 1rem ;
}

.hero-layout {
  display: flex;
  align-items: end;
  justify-content: space-between; /* pushes left & right apart */
  gap: 120px; /* controls space between text & phones */
}

.hero-left {
  flex: 1;
  text-align: left;
  max-width: 520px;
}

.hero-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Iframes inside Preview frame.

   Previews render at a real phone viewport and are scaled down to fit,
   so every thumbnail has the same proportions no matter how tall the
   template's content is. A box of an arbitrary shape gave some templates
   a scrollbar and others none. --preview-scale is set by main.js. */
.preview-frame{
  --preview-w: 390px;
  --preview-h: 844px;
  --preview-scale: 1;
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 2rem;
  background: #fff;
}

.preview-frame__doc{
  position: absolute;
  top: 0;
  left: 0;
  width: var(--preview-w);
  height: var(--preview-h);
  border: 0;
  transform: scale(var(--preview-scale));
  transform-origin: top left;
}

/* The live panel is height-driven: it fills the sidebar and derives its
   width from the phone aspect ratio. */
.preview-frame--live{
  width: auto;
  height: 80%;
}



/* --- Responsive tweaks --- */
@media (max-width: 992px) {
  .hero-layout {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 60px;
    text-align: center;
    
  }

  .hero-left, .hero-right {
    max-width: 100%;
  }
  .hero-right{
    display: flex;
    align-items: center;
    justify-items: center ;
  }
}
.cta-section {
  background-color: #90b956; /* your MyBio primary green */
  color: #fff;
  border-radius: 8px;
  margin-top: 2rem;
}

body.dark-mode .cta-section {
  background-color: #7a9d49;
}

.cta-section .button-cta-custom {
  background-color: #fff;
  color: #90b956!important;
  border: 1px solid black;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}

.cta-section .button-cta-custom:hover {
  background-color: #7a9d49;
  color: #f1eeed!important;
}



/* ========================
   Footer Styles
======================== */

footer {
  background: var(--light-card);
  border-top: 1px solid var(--border-light);
  padding: 1rem;
  text-align: center;
}

body.dark-mode footer {
  background: var(--dark-card);
  border-top: 1px solid var(--border-dark);
  color: var(--text-dark);
}

/* ========================
   Responsive Styles
======================== */

/* Phones (<=575px) */
@media (max-width: 575.98px) {
  h1 { font-size: 1.5rem; }
  .error-code { font-size: 4rem; }
  .card, .stats-card { padding: 0.75rem; }
  .navbar .nav-link { font-size: 0.85rem; }
  .fab { bottom: 15px; right: 15px; padding: 8px 12px; font-size: 0.85rem; }
  .public-phone{
    width: 100%; 
    height: 100vh; 
    border:none;
    border-radius: 0px;
  }
}

/* Small Tablets (576px–767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  h1 { font-size: 1.75rem; }
  .error-code { font-size: 5rem; }
  .stats-card { padding: 1rem; }
  .public-phone{
    width: 100%; 
    height: 100vh; 
    border:none;
    border-radius: 0px;
  }
}

/* Tablets / Small Laptops (768px–991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  h1 { font-size: 2rem; }
  .error-code { font-size: 6rem; }
  .navbar .nav-link { font-size: 0.95rem; }
  .public-phone{
    width: 100%; 
    height: 100vh; 
    border:none;
    border-radius: 0px;
  }
}

/* Desktops (>=992px) */
@media (min-width: 992px) {
  h1 { font-size: 2.25rem; }
  .navbar .nav-link { font-size: 1rem; }
}
