:root {
  --yellow: #f9c923;
  --yellow-active: #ffdb3b;
  --purple: #8e44ad;
  --sidebar-width: 280px;
  --gradient: linear-gradient(to right, rgba(55, 48, 163, 0.8), #4f46e5);
  --white: #ffffff;
  --indigo-100: #e0e7ff;
}

body {
  margin: 0;
  /* font-family: 'Segoe UI', sans-serif; */
  font-family: "Poppins", sans-serif;
  background: #f9fafb;
  color: #222;
}

.header {
  background-color: #ffffff;
  /* box-shadow: 0 -8px 14px 2px rgba(0, 0, 0, 0.3); */
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: fixed;
  z-index: 1000;
  width: 100%;
}

.header .img-wrapper {
  display: flex;
  align-items: center;
  padding: 8px 20px;
}

.header .img-wrapper img {
  width: 55px;
}

.header .img-wrapper .title {
  font-size: 28px;
  font-weight: 700;
  font-family: "DM Sans", sans-serif;
}

.footer {
  background-color: #fff;
  padding: 20px 20px 20px 260px;
  font-size: 14px;
  border-top: 1px solid #e5e7eb;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo img {
  width: 120px;
  margin-bottom: 15px;
}

.footer-links {
  margin: 10px 0;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  color: #777;
}

.container {
  display: flex;
  /* background: #fff; */
  padding-top: 70px;
  min-height: calc(100vh - 132px);
  /* min-height: calc(100vh - 70px); */
}

.sidebar {
  width: 300px;
  min-width: 200px;
  /* border-right: 1px solid #eee; */
  border-right: 1px solid #e5e7eb;

  background: #fff;
  /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04); */
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 2;
  height: calc(100vh - 70px);
  position: fixed;
}

.sidebar-title {
  margin: 10px 0 20px 0;
  font-size: 18px;
  font-weight: 600;
}

.sidebar-inner {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  /* gap: 10px; */
}

.accordion-item.active {
  border: 1px solid #eee;
  border-radius: 12px;
}

.accordion-item {
  width: 100%;
}

.accordion-header {
  width: 100%;
  padding: 14px 15px;
  font-weight: 500;
  background: white;
  /* color: #18204A; */
  color: #4b5563;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
  outline: none;
  font-size: 1rem;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* margin: 8px 0; */
}

.accordion-item:not(.active) > .accordion-header.active {
  border: 1px solid #ddd;
}

/* .accordion-header:hover {
        background: var(--indigo-100);
        color: #18204A;
    } */

.accordion-content {
  /* display: none;
        background: #fff;
        border-radius: 0 0 6px 6px;
        border-top: 1px solid #f3e7b7;
        margin-bottom: 8px;
        margin-top: 5px; */
  padding: 0 10px;
}

/* .accordion-content.show {
        display: block;
        animation: fadeIn 0.2s;
    } */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.accordion-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 12px;
  font-size: 1rem;
  /* color: #18204A; */
  /* color: rgba(0, 0, 0, 0.8); */
  color: #4b5563;
  margin: 8px 0;
  border: 1px solid transparent;
  transition: color 0.2s ease;
}

.sidebar-item[data-content="rich-media"] {
  margin: 0;
}

.sidebar-item.active {
  /* background: var(--gradient);
        color: var(--white); */
  /* color: #18204A; */
  color: #6366f1;
  /* border: 1px solid #eee; */
  border: 1px solid #ddd;
  font-weight: 500;
}

.sidebar-item:not(.active):hover {
  /* color: #18204A; */
  border: 1px solid #eee;
}

/* .sidebar-item:not(.active):hover i {
        color: #18204A;
    } */

.sidebar-item i {
  color: #4b5563;
  transition: color 0.2s ease;
  width: 20px;
  height: 20px;
}

.sidebar-item.active i {
  color: #6366f1;
}

.sidebar-item svg {
  fill: #4b5563;
  transition: fill 0.2s ease;
  width: 20px;
  height: 20px;
}

.sidebar-item.active svg {
  fill: #6366f1;
}

.sidebar-static .sidebar-item {
  padding: 10px 15px;
}

/* .sidebar-static {
        margin-top: 10px;
    } */

/* .divider {
        width: auto;
        color: black;
        border-bottom: 1px solid rgb(212, 209, 209);
    } */

.content {
  flex: 1;
  /* padding: 40px 40px 20px 40px; */
  padding: 20px 40px;
  overflow-y: auto;
  min-width: 0;
  /* background: #fff; */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* min-height: calc(100vh - 184px); */
  margin-left: 300px;
}

.content-panel {
  /* display: none; */
  display: block;

  width: 100%;
  /* max-width: 900px; */
  max-width: 1100px;
  margin: 0 auto;
  animation: fadeIn 0.2s;
}

/* .content-panel.show {
  display: block;
} */

.highlight {
  color: #4f46e5;
  font-weight: 500;
  margin-bottom: 20px;
}

.preview-wrapper {
  background: var(--white);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.preview-box {
  /* margin-top: 24px; */
  border-radius: 12px;
  padding: 32px 16px;
  box-shadow: 0 2px 8px rgba(142, 68, 173, 0.04);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  position: relative;
}

.preview-box img {
  /* width: 100%; */
  max-width: 900px;
}

.device-tablet {
  width: 610px;
  height: 690px;
}

.device-mobile {
  width: 396px;
  height: 700px;
}

.device-amp {
  width: 396px;
  height: 700px;
}

.device-desktop {
  width: 851px;
  height: 447px;
}

.device-tv {
  width: 727px;
  height: 465px;
}

.preview-box .preview-iframe {
  position: absolute;
  z-index: 2;
  border: none;
  pointer-events: auto;
}

.preview-box .preview-video {
  position: absolute;
  z-index: 2;
  border: none;
  pointer-events: auto;
}

/* Device-specific iframe positioning */
.preview-box .iframe-desktop {
  top: 500;
  left: 500;
  width: 662px;
  height: 392px;
}

.preview-tv-box .iframe-desktop {
  width: 699px;
  height: 395px;
  top: 47px;
}

.preview-tv-box .video-desktop {
  width: 700px;
  height: 395px;
  top: 48px;
}

.preview-box .iframe-tablet {
  top: 500;
  left: 500;
  width: 550px;
  height: 636px;
}

.preview-box .iframe-mobile {
  top: 4;
  left: 500;
  width: 365px;
  height: 600px;
}

.preview-box .iframe-amp {
  top: 4;
  left: 500;
  width: 365px;
  height: 600px;
}

.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #6366f1;
  border-radius: 50%;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s,
    background-color 0.3s,
    box-shadow 0.3s;
  cursor: pointer;
}

.link a {
  color: white;
}

.link:hover {
  /* background-color: var(--yellow);
        color: var(--purple); */
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.link:active {
  transform: scale(0.95);
}

.device-icons {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 6px 0;
}

.device-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--indigo-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  font-size: 1.2em;
  border: 2px solid #c7d2fe;
  cursor: pointer;
}

.device-icon.selected {
  background: #6366f1;
  color: #fff;
  border-color: var(--gradient);
}

/* ---------- Layout Tabs  - CTV  --------  */

.layout-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.layout-tabs button {
  padding: 8px 15px;
  cursor: pointer;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  background: var(--indigo-100, #e0e7ff);
  color: #6366f1;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

/* .layout-tabs button:hover {
        background: #c7d2fe;
    } */

.layout-tabs button.active {
  background: #6366f1;
  color: #fff;
  border-color: var(--gradient, #4f46e5);
}

@media (max-width: 1225px) {
  .device-desktop {
    width: 700px;
    height: 400px;
  }

  .device-tv {
    width: 645px;
    height: 416px;
  }

  .preview-tv-box .iframe-desktop {
    width: 622px !important;
    top: 47px;
    border-radius: 0 !important;
  }

  .preview-tv-box .video-desktop {
    width: 622px !important;
    top: 47px;
    border-radius: 0 !important;
  }

  .device-tablet {
    width: 500px;
    height: 600px;
  }

  .preview-box .iframe-desktop {
    top: 500;
    left: 500;
    width: 550px;
    height: 350px;
    border-radius: 8px;
  }

  .preview-box .iframe-tablet {
    top: 500;
    left: 500;
    width: 450px;
    height: 565px;
    border-radius: 19px;
  }
}

@media (max-width: 1057px) {
  .device-desktop {
    width: 650px;
    height: 400px;
  }

  .device-tv {
    width: 522px;
    height: 332px;
  }

  .device-tablet {
    width: 500px;
    height: 600px;
  }

  .preview-tv-box .iframe-desktop {
    top: 44px;
    width: 500px !important;
    height: 280px !important;
  }

  .preview-tv-box .video-desktop {
    top: 44px;
    width: 500px !important;
    height: 280px !important;
  }

  .preview-box .iframe-desktop {
    top: 500;
    left: 500;
    width: 500px;
    height: 350px;
    border-radius: 8px;
  }

  .preview-box .iframe-tablet {
    top: 500;
    left: 500;
    width: 450px;
    height: 565px;
    border-radius: 19px;
  }
}

@media (max-width: 900px) {
  .device-desktop {
    width: 440px;
    height: 300px;
  }

  .device-tablet {
    width: 500px;
    height: 600px;
  }

  .device-tv {
    width: 400px;
    height: 255px;
  }

  .preview-tv-box .iframe-desktop {
    top: 25px;
    width: 384px !important;
    height: 215px !important;
  }

  .preview-tv-box .video-desktop {
    top: 25px;
    width: 384px !important;
    height: 215px !important;
  }

  .device-mobile {
    width: 335px;
    height: 585px;
  }

  .device-amp {
    width: 335px;
    height: 585px;
  }

  /* Device-specific iframe positioning */
  .preview-box .iframe-desktop {
    top: 500;
    left: 500;
    width: 350px;
    height: 265px;
    border-radius: 8px;
  }

  .preview-box .iframe-tablet {
    top: 500;
    left: 500;
    width: 395px;
    height: 565px;
    border-radius: 19px;
  }

  .preview-box .iframe-mobile {
    top: 4;
    left: 500;
    width: 300px;
    height: 525px;
    border-radius: 25px;
  }

  .preview-box .iframe-amp {
    top: 4;
    left: 500;
    width: 300px;
    height: 525px;
    border-radius: 25px;
  }
}

@media (max-width: 767px) {
  .device-desktop {
    width: 400px;
    height: 200px;
  }

  .device-tablet {
    width: 325px;
    height: 400px;
  }

  .device-mobile {
    width: 280px;
    height: 500px;
  }

  .device-amp {
    width: 280px;
    height: 500px;
  }

  /* Device-specific iframe positioning */
  .preview-box .iframe-desktop {
    top: 500;
    left: 500;
    width: 280px;
    height: 175px;
    border-radius: 8px;
  }

  .preview-box .iframe-tablet {
    top: 500;
    left: 500;
    width: 300px;
    height: 375px;
    border-radius: 19px;
  }

  .preview-box .iframe-mobile {
    top: 500;
    left: 500;
    width: 240px;
    height: 450px;
    border-radius: 5px;
  }

  .preview-box .iframe-amp {
    top: 500;
    left: 500;
    width: 240px;
    height: 450px;
    border-radius: 5px;
  }

  .content-panel h1 {
    /* margin-left: 20px; */
    display: flex;
    font-size: 3rem;
    justify-content: center;
  }

  .highlight {
    display: flex;
    justify-content: center;
  }
}

.device-icons .device-icon img {
  /* background:transparent; */
  /* background-color: red; */
  /* width: 200px; */
}

@media (max-width: 900px) {
  .content {
    padding: 25px;
  }

  .preview-box {
    padding: 16px 4px;
    min-height: 180px;
  }
}

@media (max-width: 767px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #eee;
    box-shadow: none;
    margin-left: 0;
  }

  .accordion-item,
  .sidebar-static {
    /* flex: 1 1 0; */
    min-width: 120px;
  }

  /* .accordion-header,
        .sidebar-item {
            font-size: 0.98rem;
            padding: 10px 10px;
        } */

  .content {
    padding: 25px;
    margin-left: 0;
  }

  .footer {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 20px 12px;
  }

  .preview-box {
    padding: 4px 0;
  }

  .device-tv {
    width: 320px;
    height: 205px;
  }

  .preview-tv-box .iframe-desktop {
    top: 11px;
    width: 307px !important;
    height: 173px !important;
  }

  .preview-tv-box .video-desktop {
    top: 11px;
    width: 307px !important;
    height: 173px !important;
  }
}

.d-none {
  display: none;
}

@media (max-width: 767px) {
  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
  }

  .header img {
    width: 140px;
    height: auto;
  }

  .mobile-sidebar-toggle {
    display: inline-block;
    font-size: 24px;
    background: transparent;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    color: #18204a;
    z-index: 1002;
  }

  /* .sidebar {
            display: none;
            position: absolute;
            top: 85px;
            left: 0;
            background: #fff;
            width: 100%;
            z-index: 1001;
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }

        .sidebar.sidebar-open {
            display: block;
        } */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    margin-top: 71px;
    height: calc(100vh - 71px);
    width: 300px;
    background: #fff;
    /* box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3); */
    transform: translateX(-100%);
    /* Hidden to the left */
    transition: transform 0.3s ease;
    z-index: 1001;
    border-right: 1px solid #e5e7eb;
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
    /* Slide into view */
  }
}

@media (min-width: 768px) {
  .mobile-sidebar-toggle {
    display: none;
  }
}

.content-panel h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  /* margin: 35px 20px 10px 20px; */
  margin: 14px 0 10px 0;
  font-weight: 700;
  color: #222;
  line-height: 1.2;
  word-break: break-word;
  font-family: "Plus Jakarta Sans", sans-serif;
}

/* Optional: center align on mobile */
@media (max-width: 768px) {
  .content-panel h1 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2rem);
  }

  .ctv-wrapper h1 {
    text-align: center;
  }

  .device-icons {
    margin: 12px 0;
  }
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(3px);
  background-color: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 998;
  pointer-events: none;
}

.backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/*  ======================== */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* .accordion-content.show {
  overflow: hidden;
} */

.chevron {
  transition: all 0.3s ease;
}

.accordion-header.active .chevron {
  transform: rotate(180deg);
}

.sidebar-item a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

/*  ======================== */
