
body{
  border-top: 15px solid var(--katheeb-color-bg);
}

.katheeb-the-main{
	margin: 0 auto;
  padding-top: 20px;
  padding-inline: 1rem;
  max-width: 2000px;

  .grid-container{
    max-width: 1400px;
    padding-inline: 1rem;
    
    @media only screen and (max-width: 1416px) {
      padding-inline: 0;
    }

    @media only screen and (max-width: 768px) {
      margin: 0;
    }
  }

  @media only screen and (max-width: 768px) {
    border-top: none;
    padding-top: 0;
  }
}

.for-langs{
  display: none;
}

.kthb-lang-ar .for-ar,
.kthb-lang-en .for-en{
  display: block;
}

.site-info{
  background: transparent;
}


/* ==========================================================================
   Dark / Light Mode Variables
   ========================================================================== */

:root {
  --kthb-surface: #ffffff;
  --kthb-surface-secondary: #f9f9f9;
  --kthb-text-primary: #1a1a1a;
  --kthb-text-secondary: #666666;
  --kthb-text-muted: #6b7280;
  --kthb-border-color: #ededed;
  --kthb-input-border: #D0D5DD;
  --kthb-input-text: #344054;
  --kthb-control-hover-bg: rgba(0, 0, 0, 0.04);
  --kthb-control-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);

  /* Notice / chip severity tones (shared by .kthb-message + plan chip) */
  --kthb-tone-warning-bg: #fffbeb;
  --kthb-tone-warning-border: #fcd34d;
  --kthb-tone-warning-fg: #92400e;
  --kthb-tone-warning-link: #78350f;
  --kthb-tone-danger-bg: #fef2f2;
  --kthb-tone-danger-border: #fca5a5;
  --kthb-tone-danger-fg: #b91c1c;
  --kthb-tone-danger-link: #991b1b;
  --kthb-tone-info-bg: #eff6ff;
  --kthb-tone-info-border: #93c5fd;
  --kthb-tone-info-fg: #1d4ed8;
  --kthb-tone-info-link: #1e40af;
  /* Promo = positive offer → success / brand-mint (not pink) */
  --kthb-tone-promo-bg: #ecfdf5;
  --kthb-tone-promo-border: #6ee7b7;
  --kthb-tone-promo-fg: #047857;
  --kthb-tone-promo-link: #065f46;
  /* Success badges / on-state share the promo green family */
  --kthb-tone-success-bg: var(--kthb-tone-promo-bg);
  --kthb-tone-success-border: var(--kthb-tone-promo-border);
  --kthb-tone-success-fg: var(--kthb-tone-promo-fg);
  --kthb-tone-success-link: var(--kthb-tone-promo-link);
  --kthb-tone-neutral-bg: var(--kthb-surface-secondary);
  --kthb-tone-neutral-border: var(--kthb-border-color);
  --kthb-tone-neutral-fg: var(--kthb-text-secondary);
  --kthb-tip-bg: #fffbdd;
  --kthb-tip-fg: #5c4b1a;
}

.kthb-dark-mode {
  --base-2: #222;
  --kthb-surface: #2a2b2d;
  /* Nested cards / chips need contrast against the page surface */
  --kthb-surface-secondary: #333436;
  --kthb-text-primary: #fff;
  --kthb-text-secondary: #c8c8c8;
  --kthb-text-muted: #9ca3af;
  --kthb-border-color: #545454;
  --kthb-input-border: #5a5a5a;
  --kthb-input-text: #e4e6e9;
  --kthb-control-hover-bg: rgba(255, 255, 255, 0.06);
  --kthb-control-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --katheeb-light-hover: #3a3c40;

  --katheeb-color-bg: #baefe3;
  --katheeb-primary-color: #baefe3;
  --katheeb-primary-color-darker: #9ed5c8;
  --katheeb-button-bg-color: var(--katheeb-primary-color);
  --katheeb-button-text-color: #004d5b;

  --base-3: var(--kthb-surface);
  --accent: #ffffff;
  --contrast: var(--katheeb-color-bg);

  /* Same softness as plan-chip is-warning / is-danger */
  --kthb-tone-warning-bg: #3a2f14;
  --kthb-tone-warning-border: #8a6d1f;
  --kthb-tone-warning-fg: #fbd88b;
  --kthb-tone-warning-link: #fbd88b;
  --kthb-tone-danger-bg: #3a1a1a;
  --kthb-tone-danger-border: #8a3a3a;
  --kthb-tone-danger-fg: #f5c2c2;
  --kthb-tone-danger-link: #f5c2c2;
  --kthb-tone-info-bg: #142a3a;
  --kthb-tone-info-border: #3a6a8a;
  --kthb-tone-info-fg: #b2d8f5;
  --kthb-tone-info-link: #b2d8f5;
  --kthb-tone-promo-bg: #14352f;
  --kthb-tone-promo-border: #3a6a5f;
  --kthb-tone-promo-fg: #b2e8dc;
  --kthb-tone-promo-link: #b2e8dc;
  --kthb-tone-success-bg: var(--kthb-tone-promo-bg);
  --kthb-tone-success-border: var(--kthb-tone-promo-border);
  --kthb-tone-success-fg: var(--kthb-tone-promo-fg);
  --kthb-tone-success-link: var(--kthb-tone-promo-link);
  --kthb-tone-neutral-bg: var(--kthb-surface-secondary);
  --kthb-tone-neutral-border: var(--kthb-border-color);
  --kthb-tone-neutral-fg: var(--kthb-text-secondary);
  --kthb-tip-bg: var(--kthb-tone-warning-bg);
  --kthb-tip-fg: var(--kthb-tone-warning-fg);

  color-scheme: dark;
}

.kthb-dark-mode {
  color: var(--kthb-text-primary);

  .separate-containers .inside-article{
    background-color: var(--kthb-surface) !important;
    color: var(--kthb-text-primary);
  }

  .kthb-button {
    &.kthb-button-secondary {
      background: #36383b !important;
      color: #d0d0d0 !important;

      &:hover{
        background: #4d4d4d !important;
      }
    }

    &.kthb-button-light {
      background: var(--kthb-surface) !important;
      border-color: var(--kthb-border-color);
      color: var(--kthb-text-secondary) !important;

      &:hover{
        background: var(--kthb-surface) !important;
        border-color: var(--katheeb-button-bg-color) !important;
        color: var(--katheeb-button-text-color) !important;
      }
    }
  }

  .katheeb-visual {
    & :checked + label::before{
      color: var(--kthb-surface-secondary);
    }
  }

  .ts-dropdown,
  .kthb-picker-container .iris-picker {
    border: 1px solid var(--kthb-border-color);
    background-color: var(--kthb-surface);
  }

  .kthb-table tr.is-hidden {
    background-image: linear-gradient(135deg, #222222 25%, #1a1a1a 25%, #1a1a1a 50%, #222222 50%, #222222 75%, #1a1a1a 75%, #1a1a1a 100%);
  }

  .slider{
    background-color: rgb(11 11 11);
  }

  input[type="date"]::-webkit-calendar-picker-indicator{
    filter: invert(1);
  }
}


/* ==========================================================================
   Status Badges (soft pills — same tones as .kthb-message)
   ========================================================================== */

.kthb-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 3px;
	border: 1px solid transparent;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

.kthb-badge-pill {
	border-radius: 20px;
	padding: 3px 12px;
	font-size: 13px;
}

.kthb-badge-success {
	background: var(--kthb-tone-success-bg);
	border-color: var(--kthb-tone-success-border);
	color: var(--kthb-tone-success-fg);
}

.kthb-badge-warning {
	background: var(--kthb-tone-warning-bg);
	border-color: var(--kthb-tone-warning-border);
	color: var(--kthb-tone-warning-fg);
}

.kthb-badge-error {
	background: var(--kthb-tone-danger-bg);
	border-color: var(--kthb-tone-danger-border);
	color: var(--kthb-tone-danger-fg);
}

.kthb-badge-info {
	background: var(--kthb-tone-info-bg);
	border-color: var(--kthb-tone-info-border);
	color: var(--kthb-tone-info-fg);
}


.kthb-trial-countdown-prompt .kthb-trial-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--kthb-tone-warning-fg);
  letter-spacing: 0.02em;
}
.kthb-trial-countdown-prompt .kthb-trial-countdown-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.kthb-trial-countdown-prompt .kthb-trial-countdown-unit small {
  display: inline;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}
.kthb-trial-countdown-prompt .kthb-trial-countdown-sep {
  opacity: 0.5;
  font-weight: 500;
}
.kthb-trial-countdown-prompt .kthb-trial-countdown.is-expired {
  font-size: 15px;
  font-family: inherit;
  color: var(--kthb-tone-danger-fg);
}
.kthb-trial-countdown-prompt .kthb-trial-countdown-expired {
  font-weight: 700;
}
.kthb-trial-countdown-prompt + .kthb-social-account-actions{
  padding-top: 0;
}

.kthb-social-danger-error {
  padding: 15px;
  background: var(--kthb-tone-danger-bg);
  border: 1px solid var(--kthb-tone-danger-border);
  border-radius: 8px;
  color: var(--kthb-tone-danger-fg);
}

#kthb-social-box{
  video.kthb-social-media{
    display: none;
  }

  &.kthb-social-auto-play-videos,
  &.kthb-social-hover-play-videos .kthb-social-post-link:hover,
  &.kthb-social-hover-play-videos .kthb-social-post-link.kthb-video-has-played,
  &.kthb-social-first-auto-play-videos .kthb-social-post-link:hover,
  &.kthb-social-first-auto-play-videos .kthb-social-post-link.kthb-video-is-playing,
  &.kthb-social-first-auto-play-videos .kthb-social-post-link.kthb-video-has-played{
    video.kthb-social-media{
      display: block;
    }

    video+img.kthb-social-media{
      display: none !important;
    }
  }
}

/* SnapStory story strip / 3D carousel cards: video always shown with its poster
   (the grid hides videos until hover/play). */
#kthb-social-box .kthb-story-card video.kthb-social-media,
#kthb-social-box .kthb-story-cf-card video.kthb-social-media{
  display: block;
}

.katheeb-plans-label{
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 5px;

  strong{
    font-size: 12px;
  }

  span{
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 400;
    margin: 0;
    border-radius: 100px;
    border: 1px solid transparent;
  }

  .basic-plan{
    background: var(--kthb-tone-info-bg);
    border-color: var(--kthb-tone-info-border);
    color: var(--kthb-tone-info-fg);
  }

  .advanced-plan{
    background: var(--kthb-tone-danger-bg);
    border-color: var(--kthb-tone-danger-border);
    color: var(--kthb-tone-danger-fg);
  }
}


h1,h2,h3,h4,h5,h6{
  margin-bottom: 0;
}

/* Forms */
.is-kthb{
  .ts-wrapper .ts-control,
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="date"],
  textarea,
  .ts-control input,
  select {
    box-sizing: border-box;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid #eee;

    select {
      padding: 0;
    }

    &:not(:disabled){
      background: var(--kthb-surface);
      border-color: var(--kthb-input-border);
      color: var(--kthb-input-text);
      box-shadow: none;

      &:hover{
        border-color: var(--katheeb-primary-color-darker);
      }

      &:focus{
        outline: 3px solid rgba(186, 243, 230, 0.3);
        border-color: var(--katheeb-primary-color);
      }
    }
  }


  input[type="number"]{
    width: 80px;
  }

  /* Native date: match text fields; whole control is clickable via showPicker JS. */
  input[type="date"],
  .kthb-date-input{
    min-height: 30px;
    max-width: 100%;
    color-scheme: inherit;
    font-family: inherit;
    cursor: pointer;

    &::-webkit-calendar-picker-indicator{
      cursor: pointer;
      opacity: 0.55;
      padding: 0;
      margin-inline-start: 4px;
    }

    &:hover::-webkit-calendar-picker-indicator,
    &:focus::-webkit-calendar-picker-indicator{
      opacity: 0.85;
    }
  }

  .katheeb-option-date{
    input[type="date"],
    .kthb-date-input{
      width: 100%;
      max-width: 220px;
    }
  }

  .number-square{
    display: flex;
    margin: 10px 0 0;

    li{
      list-style: none;
      flex: 1;

      &:first-child input{
        border-end-start-radius: 5px;
        border-start-start-radius: 5px;
      }

      &:last-child input{
        border-start-end-radius: 5px;
        border-end-end-radius: 5px;
        border-inline-end-width: 1px;
      }
      
      input{
        width: 100%;
        padding: 3px;
        display: block;
        text-align: center;
        border-inline-end-width: 0;
        border-radius: 0;
      }

      label{
        display: block;
        font-size: 9px;
        text-align: center;
      }
    }
  }

  /* iOS Safari zooms focused inputs when font-size is below 16px. */
  @media only screen and (max-width: 768px) {
    .ts-wrapper .ts-control,
    input[type="text"],
    input[type="search"],
    input[type="number"],
    input[type="date"],
    input[type="url"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    .ts-control input,
    select {
      font-size: 16px;
    }
  }

}

/* iOS only, every width (iPad too) and outside .is-kthb: Tom Select dropdowns,
   screen-level inputs such as the posts search. */
@supports (-webkit-touch-callout: none) {
  input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}

/** Color Picker **/
.kthb-color-picker {
  width: 80px;
  direction: ltr;
}

.kthb-picker-container{

  .hidden {
    display: none;
  }

  .kthb-color-result.button {
    min-height: 30px;
    margin: 0 6px 6px 0;
    padding: 0 0 0 30px;
    font-size: 11px;

    &:disabled{
      cursor: not-allowed !important;
    }
  }

  .iris-square-slider .ui-slider-handle:focus {
    background-color: #50575e;
  }

  .iris-picker {
    border-radius: 0;
    border-color: #dcdcde;
    margin-top: 6px;
    right: 20px !important;
  }
}

.kthb-color-result-text {
  display: none;
}

.kthb-color-result{
  &:focus,
  &:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #1d2327;

    :after {
      color: #1d2327;
      border-color: #a7aaad;
      border-left: 1px solid #8c8f94;
    }
  }

  &:focus {
    border-color: #4f94d4;
    box-shadow: 0 0 3px rgba(34, 113, 177, 0.8);
  }
  &:active {
    transform: none !important;
  }
}

.kthb-picker-open + .kthb-picker-input-wrap {
  display: inline-block;
  vertical-align: top;
}

.kthb-picker-input-wrap{
  label {
    display: inline-block;
    vertical-align: top;
  }

  .button{
    &.kthb-picker-clear{
      display: none;
    }

    &.kthb-picker-default {
      margin-left: 6px;
      padding: 0 8px;
      line-height: 2.54545455;
      min-height: 30px;
    }
  }
}

.kthb-picker-container{
  font-weight: 500;
  text-align: left;
  text-transform: capitalize;

  input[type="text"]{
    &.kthb-color-picker {
      font-size: 12px;
      font-family: monospace;
      line-height: 2.33333333;
      margin: 0;
      padding: 0 8px;
      vertical-align: top;
      min-height: 25px;

      @media only screen and (max-width: 768px) {
        font-size: 16px;
      }
    }

    &.iris-error {
      background-color: #fcf0f1;
      border-color: #d63638;
      color: #000;
    }
  }
}

.iris-picker .iris-strip .ui-slider-handle:focus,
.iris-picker .ui-square-handle:focus {
  border-color: #3582c4;
  border-style: solid;
  box-shadow: 0 0 0 1px #3582c4;
  outline: 2px solid transparent;
}
.iris-picker .iris-palette:focus {
  box-shadow: 0 0 0 2px #3582c4;
}

.kthb-color-picker-wrapper{
  .kthb-picker-container {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;

    button.kthb-color-result {
      float: none;
      position: relative;
      width: 25px;
      height: 25px;
      min-height: 25px;
      min-width: 25px;
      margin: 0;
      padding: 0;
      cursor: pointer;
      background:
        linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(255, 255, 255, 0) 25%) 0 0,
        linear-gradient(45deg, rgba(255, 255, 255, 0) 75%, rgba(0, 0, 0, 0.1) 75%) 0 0,
        linear-gradient(45deg, rgba(255, 255, 255, 0) 75%, rgba(0, 0, 0, 0.1) 75%) -8px 8px,
        linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(255, 255, 255, 0) 25%) 8px -8px;

      background-size: 16px 16px;
      background-color: #fff;
      border-radius: 100%;
      border-color: #bbb;
      box-shadow: none;

      &[style^="background"]{
        background: transparent;
        border: transparent !important
      }

      &[style^="background-color: rgb(255, 255, 255);"],
      &[style^="background-color: rgba(255, 255,"]{
        border: 1px solid #ddd !important
      }
    }

    .iris-picker {
      position: absolute;
      z-index: 1;
    }

    .button {
      height: 30px;
      line-height: 25px;
    }

    .kthb-color-result.kthb-picker-open {
      &:after {
        content: none;
      }
    }

    input[type="text"].kthb-color-picker{
      line-height: 1.4em;
      margin-left: 8px;
      text-transform: uppercase;
    }
  }
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px !important;
  height: 22px;
  margin: 3px 0;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.switch input[disabled] + .slider { 
  background-color: red;
  opacity: .2;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color:rgb(226, 226, 226);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--katheeb-primary-color-darker);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--katheeb-primary-color-darker);
}

input:checked + .slider:before {
  transform: translateX(22px);
}


/* Plan Section */
.plan-info{
  padding: 0;
  font-size: 15px;
  margin-bottom: 10px;

  .plan-name{
    &+&{
      text-decoration: line-through;
      font-weight: 500;
      color: red;
    }
  }
}

.katheeb-label{
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid transparent;
  color: #fff !important;
  font-size: 10px;
  font-weight: 600;
  position: relative;
  display: inline-block;
  margin-inline-start: 4px;
  text-decoration: none !important;

  &.new-label{
    background: var(--kthb-tone-success-bg);
    border-color: var(--kthb-tone-success-border);
    color: var(--kthb-tone-success-fg) !important;
  }

  &.upgrade-label{
    background: var(--kthb-tone-danger-bg);
    border-color: var(--kthb-tone-danger-border);
    color: var(--kthb-tone-danger-fg) !important;
  }
}

.has-tooltip{
  cursor: help;
  position: relative;

  .tooltiptext {
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: min(220px, calc(100vw - 32px));
    background-color: #000;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    font-weight: 400;
    line-height: 1.4;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }

  &:hover .tooltiptext,
  &:focus-within .tooltiptext {
    visibility: visible;
    opacity: 1;
  }
}

#kthb-social-wrapper{
  background: var(--kthb-surface);
}

/* Normal Pages */
.entry-header{
  display: flex;
  gap: 10px;
  justify-content: space-between;

  .entry-title{
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 20px;
  }

  @media only screen and (max-width: 768px) {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;

    .entry-title{
      font-size: 22px;
      flex: 1 1 0;
      min-width: 0;
      line-height: 1.25;
    }

    .kthb-button-big{
      padding: 8px 14px;
      font-size: 13px;
      flex-shrink: 0;
    }
  }
}

.entry-content:not(:first-child){
  margin: 0;
}

:where(.wp-block-columns.is-layout-flex) {
  gap: 1.5em;
}

:where(.wp-block-columns) {
  margin-bottom: 0.75em;
}

:where(.wp-block-columns .wp-block-columns.is-layout-flex) {
  gap: 10px;
}

.separate-containers .inside-article{
  border-radius: 14px;
  padding: 20px;
}


/* Header */
.site-header {	
  .inside-header{
    padding: 10px 0;
  }

  .main-navigation{

    .main-nav ul{
      li{
        a {
          line-height: 1.5;
        }

        &:last-child{
          a{
            padding-left: 0;
          }
        }
      }
    }
  }
}

.katheeb-welcome-head{

  .katheeb-welcome-logo{
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    
    .kthb-header-logo{
      display: flex;
      align-items: center;

      img{
        max-height: 30px;
        width: auto;
        object-fit: contain;
      }
    }
  }

  .katheeb-welcome-head-inner{
    display: flex;
    padding: 20px 0 10px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
  }
  
  h1{
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin: 0;

    a{
      text-decoration: none !important;
    }
  }

  h1::after{
    content: '';
    display: inline-block;
    width: 1px;
    height: 25px;
    background: rgb(180 180 180 / 50%);
    margin-inline-start: 20px;
    margin-inline-end: 5px;
  }
  

  .katheeb-welcome-actions{
    display: flex;
    gap: 3px;
    align-items: center;
    flex-shrink: 0;

    > span{
      margin-inline-end: 10px;
      font-size: 14px;
    }

    .katheeb-welcome-store-avatar{
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 35px;
      height: 35px;
      padding: 0;
      border-radius: 50%;
      overflow: hidden;
      flex-shrink: 0;
      background: #eee;
      border: 1px solid var(--kthb-border-color);
      color: var(--kthb-text-secondary, #666);
      font-size: 12px;
      font-weight: 700;
      line-height: 1;

      img{
        display: block;
        width: 35px;
        height: 35px;
        object-fit: cover;
      }

      &:hover,
      &[aria-expanded="true"]{
        border-color: var(--katheeb-primary-color, var(--katheeb-color-bg));
      }
    }

    .katheeb-welcome-store-menu .kthb-mini-menu__panel{
      min-width: 180px;
    }
  }

  /* Mobile: single start/end row; GP stacks .inside-header by default */
  @media only screen and (max-width: 768px) {
    .katheeb-welcome-head-inner{
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: space-between;
      align-items: center;
      text-align: start;
      padding: 10px 0 15px;
      gap: 10px;
    }

    .katheeb-welcome-logo{
      flex: 1 1 auto;
      justify-content: flex-start;
      gap: 4px;

      small{
        font-size: 10px;
      }

      .kthb-header-logo img{
        max-height: 22px;
      }
    }

    h1{
      font-size: 18px;
      font-weight: 600;
      line-height: 1.2;
    }

    h1::after{
      height: 20px;
      margin-inline-start: 10px;
      margin-inline-end: 2px;
    }

    .katheeb-welcome-actions{
      margin-inline-start: auto;

      > span{
        display: none;
      }
    }
  }
}

.katheeb-action-section{
  margin-bottom: 20px;

  .katheeb-action-section-inner{
    display: flex;
    border-radius: 14px;
    padding: 0 15px;
    padding-inline-end: 8px;
    background: var(--kthb-surface);
    align-items: center;
    justify-content: space-between;

    @media only screen and (max-width: 768px) {
      flex-direction: row;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: space-between;
      text-align: start;
      padding-inline: 12px;
      gap: 8px;
      overflow: hidden;
    }
  }

  .main-navigation .inside-navigation{
    padding-inline: 0;
  }

  .main-navigation .main-nav ul{
    display: flex !important;

    li a{
      color: var(--kthb-text-secondary);
      line-height: 35px;
      padding: 10px 0 !important;
      margin-inline-end: 25px;
      font-weight: 500;
      font-size: 14px;
      justify-content: center;
      display: flex;
      align-items: center;
      gap: 5px;

      &:hover{
        color: var(--katheeb-color-bg);
      }

      @media only screen and (max-width: 768px) {
        margin-inline-end: 14px;
        font-size: 12px;
        line-height: 34px;
        white-space: nowrap;
      }
    }

    ul{
      inset-block-start: calc(100% + 4px);
      inset-inline-end: 0;
      z-index: 102;
      min-width: 160px;
      padding: 6px;
      left: 0;
      right: auto;
      border-radius: 10px;
      background: var(--kthb-surface, #fff);
      border: 1px solid var(--kthb-border-color, #ddd);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      flex-direction: column;

      li a{
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        border: 0;
        background: transparent;
        padding: 8px 10px !important;
        border-radius: 8px;
        cursor: pointer;
        justify-content: start;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.3;
        text-align: start;
        text-decoration: none !important;
        color: var(--kthb-text-primary, inherit);
        white-space: nowrap;
        box-sizing: border-box;

        &::after{
          display: none !important;
        }

        &:hover{
          background: var(--kthb-surface-secondary);
        }
      }
    }
  }

  .main-navigation .main-nav ul li[class*="current-menu-"] > a {
    color: var(--katheeb-color-bg);
    position: relative;

    &:after{
      position: absolute;
      bottom: 0;
      left: 0;
      display: block;
      height: 5px;
      width: 100%;
      border-radius: 9999px;
      background-color: var(--katheeb-primary-color);
      content: '';
    }

    @media only screen and (max-width: 768px) {
      padding: 6px 8px;

      &:after{
        height: 3px;
      }
    }
  }

  .main-navigation{
    background: transparent;
    box-shadow: none;

    .menu-item-has-children .dropdown-menu-toggle{
      padding-inline: 5px 0;
    }
  }

  .kthb-button-whatsapp{
    border-radius: 9px !important;
    padding-inline: 15px;
  }

  @media only screen and (max-width: 768px) {
    .main-navigation{
      flex: 1 1 auto;
      min-width: 0;
      max-width: 100%;
      position: relative;
    }

    .main-navigation .inside-navigation{
      display: block;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      position: relative;
    }

    .main-navigation .main-nav{
      width: 100%;
      max-width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-x: contain;
      scrollbar-width: none;
    }

    .main-navigation .main-nav::-webkit-scrollbar{
      display: none;
    }

    .main-navigation .main-nav > ul{
      display: flex !important;
      flex-wrap: nowrap !important;
      width: max-content;
      max-width: none;
      padding-inline-end: 24px;
    }

    .main-navigation .main-nav > ul > li{
      flex-shrink: 0;
    }

    /* Edge fades via overlay (not mask-image) */
    .main-navigation .inside-navigation::before,
    .main-navigation .inside-navigation::after{
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      width: 40px;
      z-index: 2;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.15s ease;
    }

    .main-navigation .inside-navigation::before{
      left: 0;
      background: linear-gradient(90deg, var(--kthb-surface) 10%, transparent);
    }

    .main-navigation .inside-navigation::after{
      right: 0;
      background: linear-gradient(270deg, var(--kthb-surface) 10%, transparent);
    }

    .rtl & .main-navigation .inside-navigation::before,
    [dir="rtl"] & .main-navigation .inside-navigation::before{
      left: auto;
      right: 0;
      background: linear-gradient(270deg, var(--kthb-surface) 10%, transparent);
    }

    .rtl & .main-navigation .inside-navigation::after,
    [dir="rtl"] & .main-navigation .inside-navigation::after{
      right: auto;
      left: 0;
      background: linear-gradient(90deg, var(--kthb-surface) 10%, transparent);
    }

    /* End fade on by default (overflow is common); JS toggles precisely */
    .main-navigation .inside-navigation::after{
      opacity: 1;
    }

    .main-navigation.is-scrollable-start .inside-navigation::before{
      opacity: 1;
    }

    .main-navigation.is-at-end .inside-navigation::after{
      opacity: 0;
    }

    .katheeb-buttons-container{
      flex-shrink: 0;
    }

    .kthb-button-whatsapp{
      padding: 8px;
      min-width: 36px;
      justify-content: center;

      .kthb-button__label{
        display: none;
      }
    }
  }
}

.home .katheeb-action-section{
	margin-bottom: 10px;
}

.katheeb-buttons-container{
  display: flex;
  gap: 10px;
}

.page > .inside-article{
  background: transparent;
  padding: 0;
  box-shadow: none;
  border: none !important;
}

/* The riyal sign is an inline SVG, so it is sized against the surrounding text
   instead of a fixed pixel height */
.kthb-currency-sar{
  display: inline-block;
  line-height: 1;
}

.kthb-currency-sar svg{
  display: block;
  width: auto;
  height: 0.78em;
  margin-block-end: 0.06em;
}

/* ==========================================================================
   Dashboard hero
   ========================================================================== */

.kthb-hero{
  margin: 10px 0;
  background: var(--kthb-surface);
  border: 1px solid var(--kthb-border-color);
  border-radius: 22px;
  padding: 16px;
}

.kthb-hero-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* No linking card (SnapStory): performance + account side by side. */
.kthb-hero-grid--two{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kthb-hero-stack--account{
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.kthb-hero-stack--account > .kthb-hero-card--account{
  flex: 1 1 auto;
}

.kthb-catalog-card{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid var(--kthb-border-color);
  border-radius: 16px;
  background: var(--kthb-surface-secondary);
}

.kthb-catalog-card__summary{
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.kthb-catalog-card__label{
  color: var(--kthb-text-secondary);
  font-size: 12px;
  line-height: 1.3;
}

.kthb-catalog-card__count{
  color: var(--kthb-text-primary);
  font-size: 20px;
  line-height: 1.2;
}

.kthb-catalog-card .kthb-store-products-resync{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  padding: 6px 12px;
}

.kthb-catalog-card .kthb-store-products-resync-icon{
  display: inline-flex;
  line-height: 0;
}

.kthb-catalog-card .kthb-store-products-resync.kthb-loading .kthb-store-products-resync-icon svg{
  animation: kthb-button-spin 0.8s linear infinite;
  transform-origin: center;
}

.kthb-hero-stack--account > .kthb-welcome-plan-chip{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--kthb-border-color);
  background: var(--kthb-surface-secondary);
  text-align: start;
}

.kthb-hero-stack--account > .kthb-welcome-plan-chip.is-warning{
  border-color: var(--kthb-tone-warning-border);
  background: var(--kthb-tone-warning-bg);
  color: var(--kthb-tone-warning-fg);
}

.kthb-hero-stack--account > .kthb-welcome-plan-chip.is-danger{
  border-color: var(--kthb-tone-danger-border);
  background: var(--kthb-tone-danger-bg);
  color: var(--kthb-tone-danger-fg);
}

.kthb-hero-stack--account > .kthb-welcome-plan-chip .kthb-welcome-plan-chip__meters{
  display: grid;
  gap: 12px;
  width: 100%;
  overflow: visible;
}

.kthb-hero-stack--account > .kthb-welcome-plan-chip .kthb-hero-meter{
  margin-top: 0;
}

.kthb-hero-stack--account > .kthb-welcome-plan-chip .kthb-welcome-plan-chip__trial{
  width: 100%;
}

.kthb-hero-card{
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  background: var(--kthb-surface-secondary);
  border-radius: 14px;
  text-align: start;
}

.kthb-hero-card__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.kthb-hero-card__title{
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.kthb-hero-card__foot-link{
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.kthb-hero-card__foot-note{
  font-size: 13px;
  color: var(--kthb-text-secondary);
}

.kthb-hero-card__foot-actions{
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 15px;
  row-gap: 5px;
  margin-inline-start: auto;
  width: 100%;
}

.kthb-hero-card__foot-secondary{
  font-size: 13px;
  font-weight: 500;
  color: var(--kthb-text-secondary);
  text-underline-offset: 2px;
}

.kthb-hero-card__foot-secondary:hover{
  color: var(--kthb-text-primary);
}

.kthb-hero-card__body{
  flex: 1 1 auto;
  min-height: 0;
}

.kthb-hero-card__foot{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.kthb-hero-headline__value{
  display: block;
  font-size:26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.kthb-hero-headline__meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

/* The denominator is context, not the number the merchant is working on */
.kthb-hero-headline__total{
  font-size: 0.55em;
  font-weight: 600;
  color: var(--kthb-text-secondary);
}

.kthb-hero-headline__label{
  font-size: 13px;
  color: var(--kthb-text-secondary);
}

/* Same pill shape as a delta, but a share carries no good/bad direction */
.kthb-hero-ratio{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: color-mix(in srgb, var(--katheeb-primary-color) 35%, transparent);
  color: var(--katheeb-button-text-color, #004d5b);
}

/* Only the metrics that actually moved land here, so the count varies */
.kthb-hero-tiles{
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 10px 0 0;
  padding-top: 10px;
  padding-inline-start: 0;
  list-style: none;
  border-top: 1px solid var(--kthb-border-color);
}

/* min-width:0 keeps up to three tiles on one row inside a third-width card */
.kthb-hero-tile{
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.kthb-hero-tile__value{
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.7;
  overflow-wrap: anywhere;
}

.kthb-hero-tile__label{
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--kthb-text-secondary);
}

/* Video watch heatmap — GitHub contribution layout (~90d + 2 months pad).
   One grid: corner + month row, then 7×weeks of square cells. */
.kthb-hero-heat{
  --kthb-hero-heat-active: var(--kthb-tone-success-fg);
  --kthb-hero-heat-future: rgb(232, 236, 242);
  --kthb-hero-heat-empty: #fff;
  --kthb-hero-heat-mix: #fff;
  --kthb-heat-gap: 5px;
  --kthb-heat-dow-w: 14px;
  --kthb-heat-weeks: 17;
  margin-top: 16px;
}

.kthb-hero-heat__grid{
  --kthb-heat-cell: calc(
    (100% - var(--kthb-heat-dow-w) - (var(--kthb-heat-gap) * var(--kthb-heat-weeks)))
    / var(--kthb-heat-weeks)
  );
  display: grid;
  grid-template-columns: var(--kthb-heat-dow-w) repeat(var(--kthb-heat-weeks), var(--kthb-heat-cell));
  gap: var(--kthb-heat-gap);
  width: 100%;
  max-width: 100%;
}

.kthb-hero-heat__corner{
  grid-column: 1;
  min-height: 10px;
}

.kthb-hero-heat__month{
  font-size: 9px;
  line-height: 1;
  color: var(--kthb-text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  text-align: start;
}

.kthb-hero-heat__dow{
  grid-column: 1;
  font-size: 9px;
  line-height: 1;
  color: var(--kthb-text-secondary);
  text-align: end;
  padding-inline-end: 2px;
  overflow: hidden;
  min-width: 0;
}

.kthb-hero-heat__cell,
.kthb-hero-heat__cell:hover{
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 2px;
  box-sizing: border-box;
  background: var(--kthb-hero-heat-empty);
  cursor: default;
  min-width: 0;
}

button.kthb-hero-heat__cell{
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

button.kthb-hero-heat__cell:hover,
button.kthb-hero-heat__cell:focus-visible{
  box-shadow: 0 0 #0000, 0 0 0 2px color-mix(in srgb, var(--kthb-hero-heat-active) 55%, transparent), 0 0 #0000;
  outline: none;
}

.kthb-hero-heat__cell.is-empty{
  visibility: hidden;
  pointer-events: none;
}

.kthb-hero-heat__cell.is-level-1{
  background: color-mix(in srgb, var(--kthb-hero-heat-active) 38%, var(--kthb-hero-heat-mix));
}

.kthb-hero-heat__cell.is-level-2{
  background: color-mix(in srgb, var(--kthb-hero-heat-active) 58%, var(--kthb-hero-heat-mix));
}

.kthb-hero-heat__cell.is-level-3{
  background: color-mix(in srgb, var(--kthb-hero-heat-active) 78%, var(--kthb-hero-heat-mix));
}

.kthb-hero-heat__cell.is-level-4{
  background: var(--kthb-hero-heat-active);
}

.kthb-hero-heat__cell.is-today{
  background: color-mix(in srgb, var(--kthb-hero-heat-active) 18%, var(--kthb-hero-heat-mix));
  box-shadow: 0 0 #0000, 0 0 0 2px color-mix(in srgb, var(--kthb-hero-heat-active) 70%, transparent), 0 0 #0000;
}

.kthb-hero-heat__cell.is-future{
  background: var(--kthb-hero-heat-future);
  pointer-events: none;
}

.kthb-hero-heat-tip{
  position: fixed;
  z-index: 100000;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1f2328;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.kthb-hero-heat-tip[hidden]{
  display: none !important;
}

.kthb-hero-heat-tip::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: #1f2328;
  transform: rotate(45deg);
}

.kthb-hero-heat-tip__date{
  display: block;
  font-weight: 700;
  color: #fff;
}

.kthb-hero-heat-tip__watch{
  display: block;
  margin-top: 4px;
  font-weight: 600;
  color: var(--katheeb-primary-color, #baefe3);
}

.kthb-hero-heat-tip.is-pending .kthb-hero-heat-tip__watch{
  font-weight: 500;
  color: #8bb4ff;
}

.kthb-hero-heat-tip__plays,
.kthb-hero-heat-tip__views{
  display: block;
  margin-top: 2px;
  color: #8bb4ff;
}

.kthb-hero-note{
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--kthb-text-secondary);
}

.kthb-hero-checklist{
  display: grid;
  gap: 10px;
  margin: 0;
  padding-inline-start: 0;
  list-style: none;
}

.kthb-hero-checklist__item{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
}

.kthb-hero-checklist__item svg{
  flex: 0 0 auto;
  color: var(--kthb-text-secondary);
  opacity: 0.5;
}

.kthb-hero-checklist__item.is-done{
  color: var(--kthb-text-secondary);
}

.kthb-hero-checklist__item.is-done svg{
  color: var(--kthb-tone-success-fg);
  opacity: 1;
}

/* The account card keeps its own markup; the hero card provides the chrome */
.kthb-hero-card--account .store-card-wrapper{
  min-height: 0;
  height: auto;
}

.kthb-hero-account-pending{
  padding: 8px 0 4px;
}

.kthb-hero-account-pending .kthb-hero-note + .kthb-hero-note{
  margin-top: 6px;
}

/* Quota meters */
.kthb-hero-meter{
  margin-top: 14px;
}

.kthb-hero-meter__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--kthb-text-secondary);
}

.kthb-hero-meter__value{
  font-weight: 600;
  color: var(--kthb-text-primary);
  white-space: nowrap;
}

.kthb-hero-meter__track{
  height: 8px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.kthb-hero-meter__fill{
  display: block;
  height: 100%;
  border-radius: 20px;
  background: var(--katheeb-primary-color);
  transition: width 400ms ease;
}

.kthb-hero-meter__fill.is-success{
  background: var(--kthb-tone-success-fg);
}

.kthb-hero-meter__fill.is-warning{
  background: var(--kthb-tone-warning-border);
}

.kthb-hero-meter__fill.is-danger{
  background: var(--kthb-tone-danger-fg);
}

/* Plan usage card + modal */
.kthb-welcome-plan-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--kthb-border-color);
  border-radius: 10px;
  background: var(--kthb-surface-secondary);
  color: var(--contrast);
  font: inherit;
  line-height: 1.2;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

a.kthb-welcome-plan-chip,
a.kthb-welcome-plan-chip:hover,
a.kthb-welcome-plan-chip:focus-visible{
  color: inherit;
  text-decoration: none;
}

.kthb-welcome-plan-chip:hover,
.kthb-welcome-plan-chip:focus-visible{
  border-color: var(--katheeb-primary-color, var(--katheeb-color-bg));
  color: var(--kthb-text-primary, inherit) !important;
  outline: none;
}

.kthb-welcome-plan-chip.is-warning:hover,
.kthb-welcome-plan-chip.is-warning:focus-visible{
  border-color: var(--kthb-tone-warning-fg);
  color: var(--kthb-text-primary, inherit) !important;
}

.kthb-welcome-plan-chip.is-danger:hover,
.kthb-welcome-plan-chip.is-danger:focus-visible{
  border-color: var(--kthb-tone-danger-fg);
  color: var(--kthb-text-primary, inherit) !important;
}

.kthb-welcome-plan-chip__plan{
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.kthb-welcome-plan-chip__label{
  font-size: 12px;
  color: var(--kthb-text-secondary);
}

.kthb-welcome-plan-chip__plan-value{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.kthb-welcome-plan-chip__name{
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.kthb-welcome-plan-chip__name.is-superseded{
  text-decoration: line-through;
  font-weight: 500;
  font-size: 13px;
  color: red;
}

.kthb-welcome-plan-chip__meters{
  display: grid;
  gap: 12px;
  min-width: 0;
}

.kthb-welcome-plan-chip__trial{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--kthb-tone-warning-bg) 0%, color-mix(in srgb, var(--kthb-tone-warning-bg) 70%, var(--kthb-tone-warning-border)) 100%);
  border: 1px solid var(--kthb-tone-warning-border);
  box-sizing: border-box;
}

.kthb-welcome-plan-chip__trial-label{
  font-size: 12px;
  font-weight: 600;
  color: var(--kthb-tone-warning-fg);
  line-height: 1.2;
}

.kthb-welcome-plan-chip__trial .kthb-trial-countdown,
.kthb-welcome-plan-chip__trial.kthb-trial-countdown-prompt .kthb-trial-countdown{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--kthb-tone-warning-fg);
  letter-spacing: 0;
  line-height: 1;
}

.kthb-welcome-plan-chip__trial.kthb-trial-countdown-prompt .kthb-trial-countdown-unit{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 8px;
  background: color-mix(in srgb, #fff 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--kthb-tone-warning-border) 55%, transparent);
}

.kthb-welcome-plan-chip__trial .kthb-trial-countdown-num{
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.kthb-welcome-plan-chip__trial.kthb-trial-countdown-prompt .kthb-trial-countdown-unit small{
  font-size: 10px;
  font-weight: 600;
  opacity: 0.8;
  line-height: 1;
}

.kthb-welcome-plan-chip__trial.kthb-trial-countdown-prompt .kthb-trial-countdown-sep{
  display: none;
}

.kthb-welcome-plan-chip__trial.kthb-trial-countdown-prompt .kthb-trial-countdown.is-expired{
  font-size: 12px;
  font-weight: 700;
  color: var(--kthb-tone-danger-fg);
  justify-content: center;
  text-align: center;
}

body.kthb-plan-usage-modal-open{
  overflow: hidden;
}

body.kthb-review-offer-open{
  overflow: hidden;
}

#kthb-review-offer{
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.kthb-review-offer p{
  color: var(--kthb-text-secondary);
  line-height: 1.6;
  margin: 0 0 12px;
}

.kthb-review-offer .kthb-review-offer__result{
  color: var(--kthb-text-primary);
  font-size: 15px;
  font-weight: 600;
}

.kthb-review-offer__banner{
  align-items: center;
  background: var(--katheeb-button-bg-color);
  border-radius: 12px;
  color: var(--katheeb-button-text-color);
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
}

.kthb-review-offer__percent{
  flex-shrink: 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}

.kthb-review-offer .kthb-review-offer__banner p{
  color: inherit;
  font-size: 13px;
  margin: 4px 0 0;
}

.kthb-review-offer__once{
  font-size: 14px;
  font-weight: 700;
}

.kthb-review-offer .kthb-review-offer__banner p.kthb-review-offer__hint{
  font-size: 12px;
  margin-top: 10px;
}

.kthb-review-offer__steps{
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.kthb-review-offer__steps li{
  display: flex;
  gap: 12px;
  margin: 0;
}

.kthb-review-offer__steps li > div{
  flex: 1;
  min-width: 0;
}

.kthb-review-offer__step-number{
  align-items: center;
  background: var(--katheeb-button-bg-color);
  border-radius: 50%;
  color: var(--katheeb-button-text-color);
  display: flex;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.kthb-review-offer .kthb-review-offer__steps p{
  color: var(--kthb-text-primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.kthb-review-offer__miss{
  border-top: 1px solid var(--kthb-border-color);
  padding-top: 12px;
}

.kthb-review-offer__miss[hidden],
.kthb-review-offer__miss [hidden]{
  display: none;
}

.kthb-review-offer__code{
  border-top: 1px solid var(--kthb-border-color);
  padding-top: 12px;
}

.kthb-review-offer__code-row{
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.kthb-review-offer__code-row kbd{
  background: var(--kthb-surface-secondary);
  border: 1px solid var(--kthb-border-color);
  border-radius: 6px;
  color: var(--kthb-text-primary);
  direction: ltr;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 14px;
}

.kthb-review-offer__steps .kthb-button{
  box-sizing: border-box;
  justify-content: center;
  width: 100%;
}

#kthb-plan-usage-modal.kthb-hub-modal--wide{
  max-width: 760px;
}

#kthb-plan-usage-modal-title .kthb-welcome-plan-chip__plan-value{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}

#kthb-plan-usage-modal-title .kthb-welcome-plan-chip__name{
  font-size: inherit;
  font-weight: inherit;
}

#kthb-plan-usage-modal-title .kthb-welcome-plan-chip__name.is-superseded{
  font-size: 13px;
  font-weight: 500;
}

.kthb-plan-usage-modal__empty{
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--kthb-text-secondary);
}

/* Beat .kthb-message border-radius / flex min-width so the callout wraps in the modal. */
.kthb-message.kthb-plan-usage-modal__promo{
  margin: 0 0 16px;
  border-radius: 12px;
  align-items: flex-start;
}

.kthb-message.kthb-plan-usage-modal__promo > span{
  min-width: 0;
  flex: 1 1 auto;
}

.kthb-plan-usage-modal__actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.kthb-plan-usage-modal__compare{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kthb-plan-usage-modal__table-wrap{
  overflow-x: auto;
  border: 1px solid var(--kthb-border-color);
  border-radius: 12px;
  background: var(--kthb-surface);
}

.kthb-plan-usage-modal__table{
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 14px;
  text-align: start;
  border: 0;
  margin-bottom: 0;
}

.kthb-plan-usage-modal__table th,
.kthb-plan-usage-modal__table td{
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--kthb-border-color);
  vertical-align: middle;
}

.kthb-plan-usage-modal__table tbody tr:last-child th,
.kthb-plan-usage-modal__table tbody tr:last-child td{
  border-bottom: 0;
}

.kthb-plan-usage-modal__table thead th{
  padding-block: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--kthb-text-secondary);
  background: var(--kthb-surface-secondary);
  white-space: nowrap;

  &:first-child{
    text-align: start;
  }
}

.kthb-plan-usage-modal__metric-col{
  width: 38%;
}

.kthb-plan-usage-modal__table tbody th.kthb-plan-usage-modal__metric-col{
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  color: var(--kthb-text-primary);
  text-align: start;
}

.kthb-plan-usage-modal__current-col,
.kthb-plan-usage-modal__plan-col{
  width: auto;
  text-align: center;
}

.kthb-plan-usage-modal__value,
.kthb-plan-usage-modal__plan-col{
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--kthb-text-primary);
  white-space: nowrap;
}

.kthb-plan-usage-modal__hint{
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--kthb-text-secondary);
  white-space: normal;
}

.kthb-plan-usage-modal__table tbody tr:hover th,
.kthb-plan-usage-modal__table tbody tr:hover td{
  background: color-mix(in srgb, var(--kthb-surface-secondary) 65%, transparent);
}

/* Same warning (≥75%) / danger (over) colors as the plan chip meters. */
.kthb-plan-usage-modal__table tr.is-danger > .kthb-plan-usage-modal__metric-col,
.kthb-plan-usage-modal__table tr.is-danger > .kthb-plan-usage-modal__current-col,
.kthb-plan-usage-modal__table tr.is-danger > .kthb-plan-usage-modal__current-col .kthb-plan-usage-modal__value{
  color: var(--kthb-tone-danger-fg);
}

.kthb-plan-usage-modal__table tr.is-warning > .kthb-plan-usage-modal__metric-col,
.kthb-plan-usage-modal__table tr.is-warning > .kthb-plan-usage-modal__current-col,
.kthb-plan-usage-modal__table tr.is-warning > .kthb-plan-usage-modal__current-col .kthb-plan-usage-modal__value{
  color: var(--kthb-tone-warning-fg);
}

.kthb-plan-usage-modal__table tr.is-danger > .kthb-plan-usage-modal__plan-col,
.kthb-plan-usage-modal__table tr.is-warning > .kthb-plan-usage-modal__plan-col{
  color: var(--kthb-tone-success-fg);
}

.kthb-plan-usage-modal__upgrade-row{
  display: grid;
  grid-template-columns: 38% repeat(calc(var(--kthb-plan-cols, 4) - 1), minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  padding-inline: 0;
}

.kthb-plan-usage-modal__upgrade-spacer{
  grid-column: 1 / 3;
}

.kthb-plan-usage-modal__upgrade-cell{
  display: flex;
  justify-content: center;
  padding-inline: 8px;
}

.kthb-plan-usage-modal__upgrade-cell .kthb-button{
  width: 100%;
  max-width: 160px;
  justify-content: center;
  box-sizing: border-box;
}

@media only screen and (max-width: 640px){
  .kthb-plan-usage-modal__metric-col{
    width: 44%;
  }

  .kthb-plan-usage-modal__table th,
  .kthb-plan-usage-modal__table td{
    padding: 12px 10px;
  }

  .kthb-plan-usage-modal__upgrade-row{
    grid-template-columns: 44% repeat(calc(var(--kthb-plan-cols, 4) - 1), minmax(0, 1fr));
  }

  .kthb-plan-usage-modal__upgrade-cell .kthb-button{
    max-width: none;
    padding-inline: 10px;
    font-size: 12px;
  }
}

.kthb-hero-note--upgrade{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Header of the linking screens: the heading and explanatory text form one
   column, while any screen action occupies the other. */
.kthb-screen-head{
  align-items: flex-start;
  gap: 12px 24px;
  margin-bottom: 20px;

  .entry-title{
    margin-bottom: 10px;
  }

  .kthb-screen-head__intro{
    min-width: 0;
  }

  .kthb-screen-head__lead{
    margin: 0;
    max-width: 80ch;
    font-size: 14px;
    color: var(--kthb-text-secondary);
  }

  .kthb-screen-head__aside{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    flex-shrink: 0;
  }

  @media only screen and (max-width: 768px) {
    .kthb-screen-head__aside{
      flex-basis: 100%;
      justify-content: space-between;
    }
  }
}

/* Notice between a screen header and its table, so it carries the gap below
   rather than the one the standalone dashboard notices need above */
.kthb-message[data-kthb-notice].kthb-screen-notice{
  margin-top: 0;
  margin-bottom: 20px;
}

/* These notices explain a whole screen, so the text is long enough to claim the
   row on its own. Sharing the row from zero keeps the control beside it until
   there is genuinely no space left for both. */
.kthb-screen-notice .kthb-notice__text,
.kthb-deep-import-pending-msg .kthb-notice__text{
  flex: 1 1 0;
  /* Capped at the row width so the smallest phones wrap instead of scrolling */
  min-width: min(320px, 100%);
}

@media (max-width: 1024px){
  .kthb-hero-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kthb-hero-stack--account{
    grid-column: span 2;
  }

  .kthb-hero-grid--two .kthb-hero-stack--account{
    grid-column: auto;
  }
}

@media (max-width: 768px){
  .kthb-hero-grid{
    grid-template-columns: minmax(0, 1fr);
  }

  .kthb-hero-stack--account{
    grid-column: auto;
  }
}

@media (max-width: 480px){
  .kthb-hero-headline__value{
    font-size: 28px;
  }
}

.kthb-dark-mode{
  .kthb-hero-meter__track,
  .kthb-hero-ratio{
    background: rgba(255, 255, 255, 0.12);
    color: var(--katheeb-button-bg-color);
  }

  .kthb-hero-heat{
    --kthb-hero-heat-empty: #1e1f21;
    --kthb-hero-heat-mix: #1e1f21;
    --kthb-hero-heat-future: #3a3b3e;
  }

  /* Loading CTAs in dark skin: keep mint (wizard dark exception) so the
     dark spinner stroke stays visible — never flat light-grey #f5f5f5. */
  .kthb-button:not(.kthb-button-secondary):not(.kthb-button-light):not(.kthb-button-remove).kthb-loading{
    &,
    &:hover,
    &:focus{
      background: var(--katheeb-button-bg-color) !important;
    }

    &::after{
      border-color: color-mix(in srgb, var(--katheeb-button-text-color) 28%, transparent);
      border-top-color: var(--katheeb-button-text-color);
    }
  }

  .kthb-button.kthb-button-secondary.kthb-loading,
  .kthb-button.kthb-button-light.kthb-loading{
    &,
    &:hover,
    &:focus{
      background: #36383b !important;
    }

    &::after{
      border-color: rgba(255, 255, 255, 0.22);
      border-top-color: #fff;
    }
  }

  .kthb-button:not(.kthb-button-secondary):not(.kthb-button-light):not(.kthb-button-remove).wizard-button-doing-action .kthb-spinner-svg .path{
    animation: spinnerDash 1.5s ease-in-out infinite;
    stroke: var(--katheeb-button-text-color);
  }

  /* Tone vars on .kthb-dark-mode drive message / chip colors.
     Trial chrome still needs explicit fills for the gradient. */
  .kthb-welcome-plan-chip__trial{
    background: linear-gradient(135deg, var(--kthb-tone-warning-bg) 0%, #4a3518 100%);
    border-color: var(--kthb-tone-warning-border);
  }

  .kthb-welcome-plan-chip__trial-label,
  .kthb-welcome-plan-chip__trial .kthb-trial-countdown,
  .kthb-welcome-plan-chip__trial.kthb-trial-countdown-prompt .kthb-trial-countdown{
    color: var(--kthb-tone-warning-fg);
  }

  .kthb-welcome-plan-chip__trial.kthb-trial-countdown-prompt .kthb-trial-countdown-unit{
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(251, 216, 139, 0.25);
  }

  .kthb-welcome-plan-chip__trial.kthb-trial-countdown-prompt .kthb-trial-countdown.is-expired{
    color: var(--kthb-tone-danger-fg);
  }
}

/* Store info shortcode: fill column height and pin actions to the bottom */
.store-card-wrapper{
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Card body fills its container; actions stay inside bordered .store-card at the bottom */
.store-card-wrapper .store-card{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.store-card-wrapper .store-card > .store-card-inner{
  flex: 0 0 auto;
}

/* Notices under the account row (bare ones carry no margin of their own) */
.store-card-wrapper > .kthb-message{
  margin-top: 20px;
}

.store-card-inner{
  display: flex;
  gap: 10px;
  
  .store-img{
    flex: 0 55px;
    line-height: 0;

    img{
      line-height: 0;
      border-radius: 100%;
      object-fit: cover;
      width: 55px;
      height: 55px;
      background: #eee;
      border: 1px solid #eee;
    }
  }

  a{
    text-decoration: none;
  }
  
  .store-info{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;

    .store-info__main{
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      width: 100%;
    }

    .store-info__names{
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    h4{
      margin: 0;
      font-weight: 600;
      font-size: 14px;
      display: flex;
      gap: 10px;
      align-items: center;
      min-width: 0;
      
      > a{
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      span{
        border: 1px solid var(--katheeb-primary-color);
        font-weight: 500;
        font-size: 11px;
        text-transform: uppercase;
        padding: 2px 10px;
        border-radius: 20px;
        display: inline-block;
        white-space: nowrap;
        flex-shrink: 0;
      }
    }

    h6{
      margin: 0;
      font-size: 12px;
      min-width: 0;
      opacity: 0.7;

      > a{
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    .kthb-store-sync-wrap{
      margin-top: 8px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }

    .kthb-store-products-resync{
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      padding: 6px 12px;
    }    
    .store-description{
      width: 100%;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;

      p{
        padding-top: 10px;
        margin: 0;
        font-size: 13px;
        color: var(--kthb-text-secondary);

        &:empty{
          display: none;
        }

        strong{
          font-weight: normal;
        }

      }
    }
  }

  .kthb-store-products-resync-icon{
    display: inline-flex;
    line-height: 0;
  }

  .kthb-store-products-resync.kthb-loading .kthb-store-products-resync-icon svg{
    animation: kthb-button-spin 0.8s linear infinite;
    transform-origin: center;
  }

}

.katheeb-demo-head{
  margin: 30px auto 0;

  .inside-article{
    margin-bottom: 20px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    h4{
      font-weight: 500;
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 5px;
    }
  }

  > .kthb-app-preview-hint{
    margin: -8px 0 16px;
    padding: 0 20px;
  }
}

.kthb-app-contained-layout .katheeb-demo-head{
  margin-top: 0;

  .inside-article{
    margin-bottom: 12px;
  }

  > .kthb-app-preview-hint{
    margin-bottom: 12px;
  }
}


#demo-extend{
  span{
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;

    svg{
      width: 16px;
      height: 16px;
    }
  }
}

.katheeb-insta-info{
  display: flex;
  justify-content:space-between;
  align-content: center;
  align-items: center ;
  gap: 10px;
}

.kthb-social-account-actions{
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-content: center;
  align-items: center;
  font-size: 14px;

  small{
    font-size: 12px;
  }
}

.store-info .kthb-social-account-actions{
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.kthb-account-actions-buttons{
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
}

.kthb-account-action-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--kthb-border-color);
  border-radius: 8px;
  background: var(--kthb-surface, #fff) !important;
  color: var(--kthb-text-secondary, #666);
  line-height: 0;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.kthb-account-action-icon svg{
  width: 14px;
  height: 14px;
}

.kthb-account-action-icon:hover,
.kthb-account-action-icon:focus-visible{
  border-color: var(--katheeb-button-bg-color) !important;
  color: var(--katheeb-button-text-color) !important;
  outline: none;
}

.kthb-account-action-icon.is-active,
.kthb-social-username-edit-toggle.is-active{
  background: var(--katheeb-button-bg-color) !important;
  border-color: var(--katheeb-button-bg-color) !important;
  color: var(--katheeb-button-text-color) !important;
}

.kthb-account-action-icon.is-danger:hover,
.kthb-account-action-icon.is-danger:focus-visible{
  border-color: #dc2626;
  color: #dc2626;
  background: #fff1f1;
}

.kthb-social-username-actions{
  display: none;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--kthb-border-color);
  border-radius: 12px;
  background: var(--kthb-surface, #fff);
  box-sizing: border-box;

  &.is-open{
    display: block;
  }
}

.kthb-social-username-form{
  text-align: start;
}

.kthb-social-username-form__hint{
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--kthb-text-secondary, #666);
}

.kthb-social-username-form__row{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.kthb-social-username-form__actions{
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.kthb-social-username-form .kthb-form-field{
  margin: 0;
}

.kthb-social-username-form .kthb-social-username-input{
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--kthb-border-color, #ddd);
  border-radius: 10px;
  background: var(--kthb-surface-secondary, #fff);
  direction: ltr;
  text-align: left;
  box-sizing: border-box;
  transition: border-color 200ms ease, box-shadow 200ms ease;

  &:focus{
    outline: none;
    border-color: var(--katheeb-primary-color-darker, #007cba);
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.12);
  }
}

.kthb-social-username-form .kthb-form-field.has-error .kthb-social-username-input{
  border-color: #dc3545;

  &:focus{
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
  }
}

.kthb-social-username-form .kthb-field-error{
  display: none;
  margin: 8px 0 0;
  color: #dc3545;
  font-size: 12px;
  line-height: 1.4;
}

.kthb-social-username-form .kthb-field-error:not(:empty):not([hidden]){
  display: block;
}

.kthb-social-username-form .kthb-social-username-cancel{
  white-space: nowrap;
}

@media (max-width: 480px){
  .kthb-social-username-form__row{
    flex-wrap: wrap;
  }

  .kthb-social-username-form .kthb-social-username-input{
    flex: 1 1 100%;
    font-size: 16px;
  }

  .kthb-social-username-form__actions{
    width: 100%;
    justify-content: flex-end;
  }
}

/** Button **/
.kthb-button{
  padding: 10px 20px;
  border-radius: 14px !important;
  color: var(--katheeb-button-text-color) !important;
  position: relative;

  &.kthb-loading{
    pointer-events: none;
    /* Light skin: wizard-aligned grey fill while busy */
    background: #f5f5f5 !important;
    color: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
    outline: 0 !important;

    &:hover,
    &:focus{
      background: #f5f5f5 !important;
    }

    /* Hide icons/spans; color:transparent also covers bare text nodes */
    & > *,
    & > svg{
      opacity: 0 !important;
    }
    &::after{
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      width: 18px;
      height: 18px;
      margin: -9px 0 0 -9px;
      border: 2px solid rgba(0, 0, 0, 0.12);
      border-top-color: var(--kthb-text-primary, #545454);
      border-radius: 50%;
      animation: kthb-button-spin 0.7s linear infinite;
    }
  }
  &.kthb-button-secondary.kthb-loading::after,
  &.kthb-button-light.kthb-loading::after,
  &.kthb-button-remove.kthb-loading::after{
    border-color: rgba(0,0,0,0.12);
    border-top-color: var(--kthb-text-primary);
  }
  background-color: var(--katheeb-button-bg-color) !important;
  font-size: 13px;
  line-height: 1.5384616;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  justify-content: center;
  text-decoration: none !important;
  position: relative;
  
  &:hover{
    background-color: var(--katheeb-primary-color-darker) !important;
  }
  
  svg{
    height: 18px !important;
    width: 18px !important;
  }
  
  &.kthb-button-remove{
    border: 1px solid red;
    background: transparent !important;
    color: red !important;
    
    &.kthb-button-small{
      padding-top: 4px;
      padding-bottom: 4px;
    }
    
    &:hover{
      opacity: 0.7;
    }
  }
  
  &.kthb-button-big{
    padding: 10px 25px;
    font-size: 15px;
  }

  &.kthb-button-small{
    padding: 6px 15px;
    font-weight: 500;
    font-size: 12px;
  }
  


  &.kthb-button-secondary{
    background: #f5f5f5 !important;
    color: #545454 !important;
    
    &:hover{
      background: #e4e4e4 !important;
    }
  }

  &.kthb-button-light {
    background: var(--kthb-surface) !important;
    border: 1px solid var(--kthb-border-color);
    color: var(--kthb-text-secondary, #666) !important;

    &:hover{
      background: var(--kthb-surface) !important;
      border-color: var(--katheeb-button-bg-color) !important;
      color: var(--katheeb-button-text-color) !important;
    }
  }

  &:disabled,
  &[aria-disabled="true"]{
    opacity: 0.5;
    cursor: not-allowed;
  }

  &.kthb-button-light:disabled:hover,
  &.kthb-button-light[aria-disabled="true"]:hover,
  &.kthb-button-secondary:disabled:hover,
  &.kthb-button-secondary[aria-disabled="true"]:hover{
    background: var(--kthb-surface) !important;
    border-color: var(--kthb-border-color) !important;
    color: var(--kthb-text-secondary, #666) !important;
  }

  &.kthb-button-whatsapp{
    background: #25D366 !important;
    color: #fff !important;

    &:hover{
      background: #1da851 !important;
    }
  }
}

.social-connect-box{
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 10px;

  .kthb-social-connect{
    width: auto;
    max-width: 100%;
  }
}

#social-connect,
.kthb-social-connect:not(.kthb-social-connect--compact){
  justify-content: center;
  max-width: 300px;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 20px;
  background: rgba( 0, 149, 246, 1) !important;
  font-weight: 600;
  color: #fff !important;
  gap: 8px;
  border-radius: 14px;

  &:hover{
    background: rgba( 24, 119, 242, 1) !important;
  }

  svg{
    fill: #fff !important;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
}

/* Same control as Manage Posts footer CTA (compact) — notices, callouts, plan modal */
.kthb-social-connect--compact{
  flex-shrink: 0;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  background: rgba( 0, 149, 246, 1) !important;
  color: #fff !important;
  gap: 8px;
  line-height: 1.4;

  &:hover{
    background: rgba( 24, 119, 242, 1) !important;
  }

  svg{
    fill: #fff !important;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
}


#katheeb-saved-success{
  position: fixed;
  top: 50px;
  right: 50px;
  animation: 0.4s ease-in-out save-modal;
  color: #fff;
  background: #00b259;
  border-color: #00b259;
  box-shadow: 0 1px 2px 2px rgba(7,17,15,.05);
  font-size: 16px;
  line-height: 1.8;
  z-index: 100;
  padding: 20px;

  .rtl &{
    left: 50px;
    right: auto;
  }
}


.kthb-message{
  padding: 15px;
  display: flex;
  justify-content: start;
  align-items: center;
  font-weight: 500;
  font-size: 13px;
  background: var(--kthb-tone-warning-bg);
  gap: 5px;
  border-radius: 14px;
  border: 1px solid var(--kthb-tone-warning-border);
  color: var(--kthb-tone-warning-fg);

  &+&{
    margin-top: 15px;
  }

  svg{
    width: 40px;
    height: 40px;
  }

  a{
    color: var(--kthb-tone-warning-link);

    &:hover{
      text-decoration: underline;
    }
  }

  h5{
    font-size: 14px;
    font-weight: bold;
  }

  .section-content &{
    margin: 0 20px 10px;
    font-weight: 400;
    font-size: 12px;
    padding: 10px;
    border-radius: 10px;
  }

  /* Info / actionable */
  &.kthb-message--actionable{
    background-color: var(--kthb-tone-info-bg);
    border-color: var(--kthb-tone-info-border);
    color: var(--kthb-tone-info-fg);

    a{
      color: var(--kthb-tone-info-link);
      font-weight: 800;
      text-decoration: underline;

      &:hover{
        color: var(--kthb-text-primary);
      }
    }
  }

  /* Warning: explicit (upgrade CTA uses severity "warning") + default bare message */
  &.kthb-message--warning{
    background-color: var(--kthb-tone-warning-bg);
    border-color: var(--kthb-tone-warning-border);
    color: var(--kthb-tone-warning-fg);

    a{
      color: var(--kthb-tone-warning-link);
    }
  }

  /* Danger: legacy -error + notice --blocking */
  &.kthb-message-error,
  &.kthb-message--blocking{
    background-color: var(--kthb-tone-danger-bg);
    border-color: var(--kthb-tone-danger-border);
    color: var(--kthb-tone-danger-fg);

    a{
      color: var(--kthb-tone-danger-link);
      font-weight: 800;
      text-decoration: underline;

      &:hover{
        color: var(--kthb-text-primary);
      }
    }
  }

  /* An offer, not a warning — success / brand-mint */
  &.kthb-message--promo{
    background-color: var(--kthb-tone-promo-bg);
    border-color: var(--kthb-tone-promo-border);
    color: var(--kthb-tone-promo-fg);

    a{
      color: var(--kthb-tone-promo-link);
      font-weight: 800;
      text-decoration: underline;

      &:hover{
        color: var(--kthb-text-primary);
      }
    }
  }

  /* We are asking the merchant for a favour, so it stays quiet */
  &.kthb-message--social{
    background: var(--kthb-surface);
    border: 1px solid var(--kthb-border-color);
    color: var(--kthb-text-secondary);

    a{
      color: var(--kthb-text-primary);
    }
  }
}

/* Hub banners each sit in their own grid-container, so the sibling rule above misses them */
.grid-container:has(> .kthb-message) + .grid-container:has(> .kthb-message){
  margin-top: 15px;
}

/* Notice shell: text takes the room, controls sit at the end */
.kthb-message[data-kthb-notice]{
  flex-wrap: wrap;
  margin-top: 20px;
}

.kthb-notice__text{
  flex: 1 1 auto;
  min-width: 0;
}

.kthb-notice__note{
  display: block;
}

.kthb-notice__actions{
  flex: 0 0 auto;
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kthb-notice__actions .kthb-social-connect,
.kthb-notice__actions .kthb-button{
  width: auto;
  max-width: 100%;
}

.kthb-location-help-button{
  margin: 0 20px 15px;

  .kthb-button{
    width: 100%;
    justify-content: center;
  }
}

#custom_location-item,
#product_media_gallery_inject-item{
  padding-top: 20px;
  border-top: 1px solid var(--kthb-input-border);
}

.kthb-pick-on-store-wrap{
  margin: 15px -5px;

  #kthb-pick-on-store{
    width: 100%;
  }
}

#inject_position-item{
  margin-top: 8px;
}

#product_media_location-item.kthb-product-media-custom-only{
  display: none;
}

#product_media_gallery_primary_only-item.kthb-product-media-gallery-inject-only{
  display: none;
}

#kthb-sample-store-message{
  padding: 5px 10px;
  border-radius: 50px;

  @media only screen and (max-width: 1200px) {
    display: none;
  }
}


.home #content{

  .entry-content{
    .wp-block-column:first-child{
      @media only screen and (max-width: 1200px) {
        display: none;
      }
    }
  }

}

#kthb-no-tags{
  tr + &{
    display: none;
  }
}

#check-group {
  animation: 0.32s ease-in-out 1.03s check-group;
  transform-origin: center;
}

#check {
  animation: 0.34s cubic-bezier(0.65, 0, 1, 1) 0.8s forwards check;
  stroke-dasharray: 0, 75px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#outline {
  animation: 0.38s ease-in outline;
  transform: rotate(0deg);
  transform-origin: center;
}

#white-circle {
  animation: 0.35s ease-in 0.35s forwards circle;
  transform: none;
  transform-origin: center;
}

@keyframes kthb-button-spin {
  to { transform: rotate(360deg); }
}

:root{
  --katheeb-saved-success-transform: 300px;
}
.rtl{
  --katheeb-saved-success-transform: -300px;
}

@keyframes save-modal {
  from {
    transform: translateX( var(--katheeb-saved-success-transform) );
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes outline {
  from {
    stroke-dasharray: 0, 345.576px;
  }
  to {
    stroke-dasharray: 345.576px, 345.576px;
  }
}
@keyframes circle {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0);
  }
}
@keyframes check {
  from {
    stroke-dasharray: 0, 75px;
  }
  to {
    stroke-dasharray: 75px, 75px;
  }
}
@keyframes check-group {
  from {
    transform: scale(1);
  }
  50% {
    transform: scale(1.09);
  }
  to {
    transform: scale(1);
  }
}

:root{
  --katheeb-panel-width: 360px;
  
  @media only screen and (max-width: 768px) {
    --katheeb-panel-width: 100%;
  }

}

body:not(.customizer-is-open){
  #the-demo-settings{
    height:0;
    width:0;
    overflow: hidden;
  }
}

body.ig-is-not-active{
  @media only screen and (max-width: 900px) {
    .katheeb-demo-head,
    &.home #page,
    #katheeb-edit-button{
      display: none;
    }
  }
}

#katheeb-edit-button{
  position: fixed;
  left: 0;
  top: 25vh;
  height: 20vh;
  padding: 0;
  font-size: 16px;
  border-radius: 0 14px 14px 0 !important;
  width: 50px;

  .rtl &{
    left: auto;
    right: 0;
    border-radius: 14px 0 0 14px !important;
  }

  span{
    transform: rotate(90deg);
  }
}

.katheeb-the-content{
  width: 100%;
}







.customizer-is-open{
  
  .katheeb-the-main{
    display: flex;
    align-items: stretch;
    flex-direction: row-reverse;
    justify-content: stretch;
  }

  #demo-panel{
    transform: translate(0, 0) !important;
  }

  #katheeb-edit-button{
    display: none;
  }

  .katheeb-the-content{
    width: calc( 100% - var(--katheeb-panel-width) );

    @media only screen and (max-width: 768px) {
      width: 100%;
    }
  }
}

#katheeb-demo{
  width: 100%;
  border: 2px dashed #cacaca !important;
  padding: 10px;
  margin-bottom: 50px;
  position: relative;

  #kthb-social-wrapper{
    z-index: 0;
  }

  #kthb-no-photos{
    display: block !important;
  }

  &.is-loading::before{
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 2;
  }

  .kthb-loading-spinner{
    z-index: 3;
  }

}

/* Preview-only floating nav (Salla carousel: arrows over left/right of media).
   Photos/PV slide math: kthb_social_salla_preview_scroller_css() in feed-widget-style.php */
body.platform-salla .kthb-preview-slider-shell{
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
}

body.platform-salla .kthb-preview-slider-nav{
  position: absolute;
  inset: 0;
  z-index: 4;
  margin: 0;
  padding: 0;
  pointer-events: none;
  display: block;
}

body.platform-salla .kthb-preview-slider-nav[hidden]{
  display: none !important;
}

body.platform-salla .kthb-preview-slider-nav__btn{
  position: absolute;
  top: var(--kthb-preview-nav-y, 50%);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: #fff !important;
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  line-height: 1;
  pointer-events: auto;
}

body.platform-salla .kthb-preview-slider-nav__prev{
  inset-inline-start: 10px;
}

body.platform-salla .kthb-preview-slider-nav__next{
  inset-inline-end: 10px;
}

body.platform-salla .kthb-preview-slider-nav__btn svg{
  display: block;
  fill: none;
}

body.platform-salla .kthb-preview-slider-nav__btn:hover:not(:disabled){
  background-color: #fff !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

body.platform-salla .kthb-preview-slider-nav__btn:disabled,
body.platform-salla .kthb-preview-slider-nav__btn.is-disabled{
  opacity: 0.45 !important;
  cursor: default;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

body.rtl.platform-salla .kthb-preview-slider-nav__btn svg,
html[dir="rtl"] body.platform-salla .kthb-preview-slider-nav__btn svg{
  transform: scaleX(-1);
}

#demo-panel{
  display: flex;
  flex-direction: column;
  justify-content: start;
  width: var(--katheeb-panel-width);
  transform: translate(-360px, 0);
  transition: transform;
  transition-duration: 0.5s;
  z-index: 99;
	padding-inline-end: 20px;
  padding-block-end: 30px;
	position: sticky;
	top: 1rem;
  overscroll-behavior: contain;

  @media only screen and (max-width: 768px) {
    padding-inline-end: 0;
    position: fixed;
    inset-block: 0;
    /* Logical start = left in LTR, right in RTL — do not flip these in .rtl. */
    inset-inline-start: 0;
    inset-inline-end: auto;
    width: 85%;
    overflow-y: auto;
    background: var(--kthb-surface, #fff);
    z-index: 9999;
    padding-block-start: 0;
    transform: translate(-100%, 0);
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.18);
    padding-block-start: 20px;
  }

  .rtl &{
    transform: translate(360px, 0);

    @media only screen and (max-width: 768px) {
      transform: translate(100%, 0);
      box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
    }
  }

  .katheeb-panel-head{
    padding: 0 25px;
    margin-bottom: 20px;

    h2{
      font-size: 16px;
      font-weight: bold;
    }
  }
}

.kthb-panel-close{
  display: none;
}

.kthb-app-panel-head__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.kthb-app-panel-head__nav .kthb-panel-close{
  @media only screen and (max-width: 768px) {
    display: inline-flex;
  }
}


.katheeb-settings-title{
  font-weight: 500;
  font-size: 13px;
}

.katheeb-option{
  padding: 0 20px;
  margin-bottom: 8px;

  &:not(.katheeb-option-number_square):not(.katheeb-option-visual):not(.kthb-select2):not(.kthb-select2-sample):not(.katheeb-option-video_picker):not(.katheeb-option-i18n):not(.katheeb-option-stack){
    display: flex;
    align-items: center;

    .katheeb-settings-title{
      flex-shrink: 0;
      max-width: 85%;
      margin-inline-end: 5px;

      & ~ *{
        max-width: 400px;
        width: 48%;
        margin-inline-start: auto;

        &.ts-wrapper{
          width: 48% !important;
        }
      }
    }
  }

  &.katheeb-option-i18n,
  &.katheeb-option-stack{
    .katheeb-settings-title{
      margin-block-end: 5px;
    }

    .kthb-i18n-field,
    > input[type="text"]{
      width: 100%;
      max-width: none;
    }
  }

  &.katheeb-option-radio {
    align-items: flex-start !important;
  }

  &.katheeb-option-radio,
  &.katheeb-option-select{
    .katheeb-settings-title{
      max-width: 50% !important;
    }
  }

  /* Match switch alignment: content-sized control on the inline-end,
     not a 48% block with the swatch floated to its start. */
  &.katheeb-option-color{
    .katheeb-settings-title ~ *{
      width: auto;
      max-width: none;
    }
  }
}

.kthb-select2-text{
  .katheeb-settings-title{
    margin-block-end: 5px;
  }

  .ts-wrapper.multi .ts-control [data-value]{
    font-size: 12px !important;
    line-height: 1.6 !important;
    border-radius: 8px !important;
    margin-inline-end: 3px !important;
    margin-block-end: 3px !important;
  }
}

#powered_by-item{
  .katheeb-settings-title{
    max-width: 80%;

    & ~ *{
      width: 30%;
    }
  }
}

.katheeb-description{
  font-size: 11px;
  padding: 0 20px;
  opacity: 0.8;
  margin: -5px 0 10px;

  p{
    margin-bottom: 15px;
  }
}

.settings-section{
  background: var(--kthb-surface);
  margin-bottom: 8px;
  border-radius: 14px;

  @media only screen and (max-width: 768px) {
    border-radius: 0;
    border-bottom: 1px solid var(--kthb-border-color);
  }
}

.katheeb-head{
  padding: 12px 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;

  &:hover{
    opacity: 0.8;
  }

  .katheeb-head-label{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .katheeb-head-switch{
    margin-inline-start: auto;
    flex-shrink: 0;
  }

  .katheeb-label{
    flex-shrink: 0;
  }
}

.settings-section.has-enable-toggle.is-feature-off{
  .katheeb-head{
    cursor: default;

    &:hover{
      opacity: 1;
    }

    > .katheeb-head-label{
      opacity: 0.55;
    }
  }

  .katheeb-head-switch{
    opacity: 1;
    cursor: pointer;
  }
}

.kthb-settings-group-feed{
  background: transparent;
  margin-bottom: 0;
  border-radius: 0;

  @media only screen and (max-width: 768px) {
    border-bottom: none;
  }

  > .katheeb-head{
    background: var(--kthb-surface);
    border-radius: 14px;

    @media only screen and (max-width: 768px) {
      border-radius: 0;
      border-bottom: 1px solid var(--kthb-border-color);
    }
  }

  > .kthb-feed-subsections{
    padding-top: 8px;
    background: transparent;
    padding-inline-start: 20px;

    .settings-section{
      margin-bottom: 5px;

      .katheeb-head{
        font-weight: 500;
      }
    }

  }
}

.kthb-settings-group-divider{
  height: 1px;
  background: var(--kthb-border-color);
  margin: 10px 8px;
}

.section-content{
  padding: 5px 0 10px;
  display: none;
}

.section-content.is-open,
.settings-section.is-solo-section > .section-content{
  display: block;
}

.settings-section.is-solo-section > .section-content{
  padding-top: 12px;
}

.katheeb-radio {
  list-style-type: none;
  margin: 0;
  font-size: 13px;

  label{
    margin-inline-start: 5px;
  }

  li:not(:last-child){
    margin-bottom: 5px;
  }
}

.katheeb-visual {
  list-style-type: none;
  gap: 5px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  padding: 0 !important;
  margin: 7px 0 0 !important;
  line-height: 0;

  @media only screen and (max-width: 768px) {
    grid-template-columns: repeat(4,1fr);
  }

  input[type="radio"] {
    display: none;
  }

  .katheeb-visual-none {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 8px;
    line-height: 1.3;
    font-size: 12px;
    text-align: center;
    color: var(--kthb-muted-color, #666);
    background: var(--kthb-light-bg, #f5f5f5);
  }

  label {
    display: block;
    position: relative;
    cursor: pointer;
    border: 3px solid var(--kthb-border-color);

    &.is-locked{
      cursor: not-allowed;

      .tooltiptext{
        left: auto;
        transform: none;
        inset-inline-start: 0;
        width: min(260px, calc(var(--katheeb-panel-width) - 40px));
        max-width: min(260px, calc(var(--katheeb-panel-width) - 40px));
        padding: 2px;
        text-align: start;
        line-height: 1.4;

        small{
          font-size: 12px;
          padding: 5px;
          display: block;
        }
        img{
          border-radius: 6px;
          width: 100%;
          height: auto;
        }
      }

      &:after{
        content: '';
        background-color: var(--kthb-tone-danger-fg);
        display: block;
        position: absolute;
        top: -6px;
        inset-inline-start: -6px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
      }
    }
    
    img {
      height: auto;
      width: 100%;
    }

    > img{
      filter: grayscale(1);
      opacity: 0.8;
    }

    &:not(.is-locked):hover{
      border-color: var(--katheeb-primary-color);

      > img{
        opacity: 1;
      }
    }
  }

  li:nth-child(3n) label.is-locked .tooltiptext{
    inset-inline-start: auto;
    inset-inline-end: 0;
  }

  @media only screen and (max-width: 768px) {
    li:nth-child(3n) label.is-locked .tooltiptext{
      inset-inline-start: 0;
      inset-inline-end: auto;
    }

    li:nth-child(4n) label.is-locked .tooltiptext{
      inset-inline-start: auto;
      inset-inline-end: 0;
    }
  }

  :checked + label:before {
    content: "\2713";
    background-color: var(--katheeb-color-bg);
    color: var(--katheeb-primary-color);
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 15px;
    font-weight: bold;
    z-index: 2;
  }

  :checked + label {
    border-color: var(--katheeb-color-bg) !important;
  }
}


#sn_logo-item,
#sn_wallpaper-item{
  img{
    filter: none;
    height: 60px;
    object-fit: cover;
    background: #000;
  }
}

.katheeb-save-section{
  position: sticky;
  z-index: 1;
  text-align: center;
  display: flex;
  bottom: 0;
  justify-content: center;
  margin-top: 20px;

  .kthb-button{
    width: 100%;
    justify-content: center;
    font-size: 14px;

    &:after{
      border-color: var(--katheeb-button-text-color);
      border-top-color: var(--katheeb-button-bg-color);
    }
  }
}

.ts-wrapper{
  width: 100% !important;
}

.ts-wrapper.single .ts-control{
  min-height: 36px !important;
}

.ts-wrapper.disabled .ts-control{
  cursor: not-allowed !important;
  opacity: 0.7;
}

.ts-wrapper.multi .ts-control [data-value]{
  background: var(--kthb-surface, #fff);
  background-image: none;
  border: 1px solid var(--kthb-input-border, #ccc);
  box-shadow: none;
  color: var(--kthb-input-text, #303030);
  text-shadow: none;
  margin-inline-end: 10px !important;
  gap: 0;
}

.ts-wrapper.multi .ts-control [data-value].active{
  background: var(--kthb-surface-secondary, #f5f5f5);
  border-color: var(--kthb-input-border, #ccc);
  color: var(--kthb-input-text, #303030);
}

.ts-wrapper.plugin-remove_button .item .remove{
  margin: 0 !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  height: 100%;
}


.kthb-ts-prod-row,
.kthb-ts-prod-option{
  display: flex;
  gap: 10px;
  align-items: center;
}

.kthb-ts-prod-chip{
  padding: 0 !important;
  display: inline-flex;
  line-height: 0;
  align-items: center;
}

.kthb-ts-prod-chip img{
  width: 60px !important;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
}

.kthb-ts-prod-chip .kthb-ts-prod-chip-name{
  display: none;
}

.ts-dropdown .create,
.ts-dropdown .no-results,
.ts-dropdown .optgroup-header,
.ts-dropdown .option{
  padding-block: 10px;
}

.ts-dropdown .active{
  background-color: var(--katheeb-light-hover) !important;
  color: var(--katheeb-color-bg) !important;
}

.ts-wrapper .ts-control{
  padding: 4px 8px !important;
  line-height: 2 !important;
}

.ts-control,
.ts-control .item{
  font-size: 14px;
  line-height: 3;
  margin: 0 !important;
}

@media only screen and (max-width: 768px) {
  .ts-control,
  .ts-control .item,
  .ts-control input {
    font-size: 16px;
  }
}

.ts-wrapper.single .ts-control{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.ts-dropdown{
  font-size: 14px;
  border-color: var(--kthb-input-border, #d0d0d0);
  z-index: 1002 !important;
  color: var(--kthb-text-primary) !important;
}

.ts-wrapper.dropdown-active{
  z-index: 1001 !important;
}

.ts-dropdown-content{
  max-height: 400px;
  font-weight: 500;
}

.ts-dropdown .option.selected{
  background-color: var(--katheeb-primary-color);
  color: var(--katheeb-button-text-color);
}

.ts-dropdown .option.selected .kthb-ts-prod-row,
.ts-dropdown .option.selected .kthb-ts-prod-option{
  filter: grayscale(100%);
}

/* Hidden at the store: still linkable, but dimmed so it reads as "won't show
   on the storefront until you publish it". */
.kthb-ts-prod-row.is-product-hidden,
.kthb-ts-prod-option.is-product-hidden,
.kthb-ts-prod-row-text.is-product-hidden,
.kthb-single-photo-thumbnail.is-product-hidden{
  opacity: 0.2;
}

/*
  Dismiss control for hub notices (renewal bar, review ask, …).
*/
.kthb-notice__dismiss{
  flex: 0 0 auto;
  appearance: none;
  background: transparent !important;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.7;

  &:hover,
  &:focus{
    opacity: 1;
  }
}

.kthb-renewal-warning .kthb-notice__dismiss{
  align-self: flex-start;
}

/* Review ask: one-line frosted bar, fixed bottom center (desktop/tablet only) */
.kthb-message.kthb-review-msg{
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 998;
  transform: translateX(-50%);
  width: auto;
  max-width: min(960px, calc(100vw - 40px));
  margin: 0;
  padding: 10px 12px 10px 20px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  font-weight: 500;
}

.kthb-dark-mode .kthb-message.kthb-review-msg{
  background: color-mix(in srgb, rgb(22, 24, 28, 0.15) 78%, transparent);
  border: 1px solid color-mix(in srgb, #fff 14%, transparent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  color: #fff;
}

.kthb-message.kthb-review-msg .kthb-notice__text{
  flex: 0 1 auto;
  min-width: 0;
}

.kthb-message.kthb-review-msg h5{
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.kthb-message.kthb-review-msg .kthb-notice__actions{
  flex: 0 0 auto;
  margin: 0;
  display: flex;
  align-items: center;
}

.kthb-message.kthb-review-msg > .kthb-review-msg__stars{
  flex: 0 0 auto;
}

.kthb-review-msg__stars{
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 0;
  padding-inline-end: 12px;
  margin-inline-end: 4px;
  border-inline-end: 1px solid rgba(0, 0, 0, 0.1);
}

.kthb-dark-mode .kthb-review-msg__stars{
  border-inline-end-color: color-mix(in srgb, #fff 18%, transparent);
}

.kthb-review-msg__stars svg{
  width: 16px;
  height: 16px;
}

.kthb-message.kthb-review-msg .kthb-review-msg__cta{
  white-space: nowrap;
  background: rgb(22, 24, 28);
  color: #fff;
  border-color: transparent;
  font-weight: 600;

  &:hover{
    background: color-mix(in srgb, rgb(22, 24, 28) 88%, var(--kthb-tone-success-fg));
    color: #fff;
  }
}

.kthb-dark-mode .kthb-message.kthb-review-msg .kthb-review-msg__cta{
  background: #fff;
  color: rgb(22, 24, 28);

  &:hover{
    background: color-mix(in srgb, #fff 92%, var(--kthb-tone-success-fg));
    color: rgb(22, 24, 28);
  }
}

.kthb-message.kthb-review-msg .kthb-notice__dismiss{
  flex: 0 0 auto;
  margin-inline-start: 4px;
  padding-inline: 8px 6px;
  color: inherit !important;
  background: transparent !important;
  background-color: transparent !important;
  border-inline-start: 1px solid rgba(0, 0, 0, 0.1);
  opacity: 0.85;

  &:hover,
  &:focus,
  &:focus-visible,
  &:active{
    color: inherit !important;
    background: transparent !important;
    background-color: transparent !important;
    opacity: 1;
  }
}

.kthb-dark-mode .kthb-message.kthb-review-msg .kthb-notice__dismiss{
  border-inline-start-color: color-mix(in srgb, #fff 18%, transparent);
}

.kthb-message[data-kthb-notice].kthb-review-msg{
  margin-top: 0;
}

/* Import wait notice: a long sentence with a live countdown, not a headline */
.kthb-deep-import-pending-msg h5{
  margin: 0;
  font-weight: 500;
}

.kthb-import-countdown{
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.kthb-manage-posts-import-footer--importing .kthb-manage-posts-import-footer__text,
.kthb-manage-posts-import-footer--waiting .kthb-manage-posts-import-footer__text{
  font-style: italic;
}

.kthb-manage-posts-import-footer--importing::before{
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--kthb-tone-success-fg, #16a34a);
  animation: kthb-import-pulse 1.2s ease-in-out infinite;
}

@keyframes kthb-import-pulse{
  0%, 100%{ opacity: 0.35; transform: scale(0.85); }
  50%{ opacity: 1; transform: scale(1); }
}

.kthb-manage-posts-import-footer--ready,
.kthb-manage-posts-import-footer--error{
  display: flex;
  align-items: center;
  gap: 12px;
}

.kthb-deep-import-pending-msg--error h5,
.kthb-manage-posts-import-footer--error .kthb-manage-posts-import-footer__text{
  color: var(--kthb-tone-danger-fg, #b91c1c);
}

@media only screen and (max-width: 768px) {
  .kthb-message.kthb-review-msg{
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    transform: none;
    width: auto;
    max-width: none;
    border-radius: 16px;
    padding: 14px 16px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  /* Rating ask: stack so copy isn’t squeezed between stars and CTA. */
  .kthb-message.kthb-review-msg{
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "stars dismiss"
      "text text"
      "cta cta";
    align-items: center;
    gap: 10px 8px;
  }

  .kthb-message.kthb-review-msg > .kthb-review-msg__stars{
    grid-area: stars;
  }

  .kthb-message.kthb-review-msg .kthb-review-msg__stars{
    padding-inline-end: 0;
    margin-inline-end: 0;
    border-inline-end: none;
  }

  .kthb-message.kthb-review-msg .kthb-notice__text{
    grid-area: text;
    flex: none;
    min-width: 0;
  }

  .kthb-message.kthb-review-msg h5{
    white-space: normal;
    font-size: 13px;
    line-height: 1.45;
  }

  .kthb-message.kthb-review-msg .kthb-notice__actions{
    grid-area: cta;
    flex: none;
    width: 100%;
    margin: 0;
  }

  .kthb-message.kthb-review-msg .kthb-review-msg__cta{
    display: flex;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .kthb-message.kthb-review-msg .kthb-notice__dismiss{
    grid-area: dismiss;
    margin: 0;
    padding: 4px;
    border-inline-start: none;
    justify-self: end;
    align-self: start;
  }
}

/* Layout hook only — colors come from .kthb-message--blocking */
.kthb-enable-state-notice{
  margin: 10px 0 0;

  [hidden]{
    display: none !important;
  }
}

@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 0 0px rgba(255, 0, 0, 0.3);
  }
  100% {
    box-shadow: 0 0 0 20px rgba(0, 0, 0, 0);
  }
}


.kthb-loading-spinner {
	left: 50%;
	margin-left: -12px;
	margin-top: -11px;
	opacity: 0;
	position: absolute;
	top: 50%;
	transform: scale(0);
	transition: opacity 100ms ease, transform 600ms cubic-bezier(0.18, 1, 0.21, 1) 200ms;

	.kthb-spinner {
		width: 23px;
		transition: opacity 300ms cubic-bezier(0.694, 0, 0.335, 1) 50ms;

		&:before {
			content: "";
			display: block;
			padding-top: 100%;
		}

		.exiting & {
			opacity: 0;
		}

		.kthb-spinner-svg {
			margin: auto;
			position: absolute;
			height: 100%;
			width: 100%;
			left: 0;
			bottom: 0;
			right: 0;
			top: 0;
			animation: spinnerRotate 2s linear infinite;
			transform-origin: center center;

			.path {
				animation: spinnerDash 1.5s ease-in-out infinite, spinnerColor 6s ease-in-out infinite;
				stroke-dasharray: 1,200;
				stroke-dashoffset: 0;
				stroke-linecap: round;
			}
		}
	}
}

.is-loading{
  
  tr&{
    animation: pulse 1.5s cubic-bezier(.4,0,.6,1) infinite;
  }

  .kthb-loading-spinner {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,to {
    opacity: 1
  }
  50% {
    opacity: .3
  }
}

@keyframes spinnerRotate {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes spinnerDash {
	0% {
		stroke-dasharray: 1,200;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 89,200;
		stroke-dashoffset: -35px;
	}
	100% {
		stroke-dasharray: 89,200;
		stroke-dashoffset: -124px;
	}
}

@keyframes spinnerColor {
	100%,
	0% {
		stroke: var(--katheeb-primary-color-darker);
	}
	40% {
		stroke: var(--katheeb-color-bg);
	}
	66% {
		stroke: var(--katheeb-primary-color-darker);
	}
	80%,
	90% {
		stroke: var(--katheeb-color-bg);
	}
}

.kthb-posts-filters{
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 16px 0;
}

.kthb-posts-filters .screen-reader-text{
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.kthb-posts-filters-form{
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
}

.kthb-posts-search-wrap{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.kthb-posts-search-wrap input[type="search"]{
	flex: 1 1 240px;
	min-width: 0;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--kthb-input-border, #D0D5DD);
	border-radius: 8px;
	background: var(--kthb-surface);
	color: var(--kthb-input-text, #344054);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
}

.kthb-posts-search-wrap input[type="search"]:focus{
	outline: 2px solid var(--katheeb-primary-color-darker);
	outline-offset: 1px;
	border-color: var(--katheeb-primary-color-darker);
}

.kthb-posts-search-wrap .kthb-button{
	height: 38px;
}

.kthb-posts-search-clear{
	font-size: 13px;
	font-weight: 600;
	color: var(--kthb-text-muted, #6b7280);
	text-decoration: none;
	white-space: nowrap;
}

.kthb-posts-search-clear:hover,
.kthb-posts-search-clear:focus-visible{
	color: var(--kthb-text-primary, #1a1a1a);
	text-decoration: underline;
}

.kthb-posts-filters-controls{
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px 24px;
}

.kthb-posts-media-filters{
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	border-radius: 10px;
	background: var(--kthb-surface-secondary, #f3f4f6);
}

.kthb-posts-media-filter{
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border-radius: 7px;
	border: 0;
	background: transparent;
	color: var(--kthb-text-muted, #6b7280);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.kthb-posts-media-filter:hover,
.kthb-posts-media-filter:focus-visible{
	color: var(--kthb-text-primary, #1a1a1a);
	background-color: var(--kthb-control-hover-bg);
	text-decoration: none;
}

.kthb-posts-media-filter:focus-visible{
	outline: 2px solid var(--katheeb-primary-color-darker);
	outline-offset: 1px;
}

.kthb-posts-media-filter.is-active{
	background: var(--kthb-surface);
	color: var(--kthb-text-primary, #1a1a1a);
	box-shadow: var(--kthb-control-shadow);
}

.kthb-posts-tag-filter{
	display: inline-flex;
	align-items: center;
	margin: 0;
}

.kthb-posts-tag-filter select{
	height: 38px;
	min-width: 160px;
	max-width: 240px;
	padding: 0 10px;
	border: 1px solid var(--kthb-input-border, #D0D5DD);
	border-radius: 8px;
	background: var(--kthb-surface);
	color: var(--kthb-input-text, #344054);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.kthb-posts-tag-filter.is-active select{
	border-color: var(--katheeb-primary-color-darker);
}

.kthb-posts-check-filters{
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
}

.kthb-posts-check-filter,
.kthb-posts-unlinked-filter{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
}

.kthb-posts-check-filter input[type="checkbox"],
.kthb-posts-unlinked-filter input[type="checkbox"]{
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--katheeb-button-bg-color);
	cursor: pointer;
}

.kthb-posts-filter-meta{
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin-inline-start: auto;
}

.kthb-posts-filter-count{
	font-size: 13px;
	font-weight: 600;
	color: var(--kthb-text-muted, #6b7280);
	white-space: nowrap;
}

.kthb-posts-filters .kthb-posts-reset-filters{
	height: 34px;
	padding: 0 12px;
	font-size: 13px;
}

.table-message .kthb-posts-reset-filters{
	margin-top: 8px;
}

@media (max-width: 782px){
	.kthb-posts-filters-controls{
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.kthb-posts-media-filters{
		width: 100%;
	}

	.kthb-posts-media-filter{
		flex: 1 1 auto;
		justify-content: center;
	}

	.kthb-posts-tag-filter select{
		width: 100%;
		max-width: none;
	}

	.kthb-posts-filter-meta{
		margin-inline-start: 0;
		justify-content: space-between;
	}
}

.kthb-table-wrapper{
	padding: 0 !important;
  margin-bottom: 100px;
}

.kthb-table{
	margin: 0;
	padding: 0;
	font-size: 14px;

  thead{
    box-shadow: 0 6px 8px 0 rgba(0, 0, 0, .02);
  }

	&,
	tr,
	td,
	th{
		border: none;
	}

  tbody:last-child,
  tfoot{
    tr:last-child td{
      border-bottom: none;

      &:first-child{
        border-end-start-radius: 14px;
      }

      &:last-child{
        border-end-end-radius: 14px;
      }
    }
  }


	tr{
		transition: .15s ease-out;

		th,
		td{
			border-bottom: 1px solid var(--kthb-border-color);
			padding: 10px;
      position: relative;

			&:first-child{
				padding-inline-start: 30px;
			}

			&:last-child{
				padding-inline-end: 30px;
			}
		}

		th{
			&:first-child{
				border-end-end-radius: 14px;
			}

			&:last-child{
				border-start-start-radius: 14px;
			}
		}
    
		th{
			padding-block: 20px;
			font-size: 12px;
      font-weight: 500;
      text-transform: uppercase;
      text-align: start;
		}

		&.is-hidden{
			background-image: linear-gradient(135deg, #ffffff 25%, #fafafa 25%, #fafafa 50%, #ffffff 50%, #ffffff 75%, #fafafa 75%, #fafafa 100%);
			background-size: 56.57px 56.57px;
			border-color: #EAECF0 !important;

		 > *:not(.post-visibility, .landing-status){
				opacity: 40%;
				filter: grayscale(100%);
			}
		}
	}

	tbody tr:nth-child(even):not(.is-hidden){
		background-color: color-mix(in srgb, var(--kthb-surface-secondary) 45%, var(--kthb-surface));
	}

	tbody tr:hover{
		background-color: var(--katheeb-light-hover) !important;
	}

  tfoot tr:last-child{
    td{
      border-bottom: none;
    }
  }


  .table-message{
    text-align: center;
    padding-block: 10px;
    font-size: 16px;

    .kthb-button{
      display: inline-flex;
    }
  }
}

.kthb-visibility-toggle{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;

	.kthb-visibility-label{
		font-size: 13px;
		font-weight: 500;
		color: var(--kthb-text-primary, #333);
		line-height: 1;
	}

	.switch{
		margin: 0;
		flex-shrink: 0;
	}
}

#products-table tr.is-loading{
	.kthb-visibility-toggle{
		pointer-events: none;
		opacity: 0.7;
	}
}

#products-table .kthb-table{
	table-layout: fixed;
	width: 100%;

	.post-image{
		width: 16%;
	}

	.post-visibility{
		width: 18%;
	}

	.post-products{
		width: 46%;
	}

	.post-edit{
		width: 20%;
	}
}

#tags-products-table .kthb-table{
	table-layout: fixed;
	width: 100%;

	.post-tag{
		width: 22%;
	}

	.post-products{
		width: 46%;
	}

	/* Fits the nowrap edit label; Remove needs room for an icon only. */
	.post-edit{
		width: 22%;
	}

	.post-remove{
		width: 10%;
	}
}

#kthb-an-top-products-table .kthb-table,
#kthb-an-top-posts-table .kthb-table{
  a{
    text-decoration: none;
    font-size: 12px; 
  }

  thead .post-title{
    font-weight: 600;
    font-size: 14px;
  }
}

#kthb-an-top-products-table .kthb-table,
#kthb-an-top-posts-table .kthb-table{
	table-layout: fixed;
	width: 100%;
}

#kthb-an-top-products-table .post-title{
	width: 75%;
}

#kthb-an-top-products-table .post-stats{
	width: 25%;
  text-align: end;
}

#kthb-an-top-posts-table .post-title{
	width: 61%;
}

#kthb-an-top-posts-table .post-views,
#kthb-an-top-posts-table .post-clicks,
#kthb-an-top-posts-table .post-ctr{
	width: 13%;
  text-align: center;
}

/* Analytics performer thumbs sit beside the name — keep them compact. */
#kthb-an-top-products-table .kthb-single-photo-thumbnail img,
#kthb-an-top-posts-table .kthb-single-photo-thumbnail img{
	width: 40px;
}

@media only screen and (max-width: 768px) {
	#products-table{
		.kthb-table{
			font-size: 12px;

			.post-image{
				width: 18%;
			}

			.post-visibility{
				width: 12%;
			}

			.post-products{
				width: 56%;
			}

			.post-edit{
				width: 14%;
			}

			tr{
				th,
				td{
					padding: 8px 5px;

					&:first-child{
						padding-inline-start: 5px;
					}

					&:last-child{
						padding-inline-end: 5px;
					}
				}

				th{
					padding-block: 12px;
					font-size: 12px;
				}

				th.post-visibility,
				th.post-edit{
					/* Avoid truncated header text in narrow columns */
					font-size: 0;
					line-height: 0;
					color: transparent;
					overflow: hidden;
				}
			}
		}

		.kthb-visibility-label{
			display: none;
		}

		.kthb-visibility-toggle{
			gap: 0;
			justify-content: center;
		}

		td.post-edit{
			text-align: center;
		}

		.kthb-post-image-cell{
			gap: 4px;
		}

		.kthb-post-permalink{
			width: 24px;
			height: 24px;

			svg{
				width: 14px;
				height: 14px;
			}
		}

		.kthb-single-photo-thumbnail{
			img{
				width: 44px;
			}

			&.has-video .kthb-manage-post-media-open{
				width: 44px;
			}

			.kthb-sideload-pending-mark{
				inset-block-end: 14px;
				font-size: 8px;
				padding: 1px 4px;
			}
		}

		.single-photo-products{
			gap: 8px;
			padding-block-start: 10px;

			.kthb-single-photo-thumbnail{
				width: 50px;

				img{
					width: 50px;
					border-radius: 6px;
				}
			}

			.kthb-linked-product-primary-badge{
				inset-block-start: -8px;
				font-size: 8px;
				padding: 1px 5px;
			}
		}

	}

	/* Icon-only link buttons: the label would not fit either screen's column */
	.kthb-social-edit-photo,
	.kthb-social-edit-relation{
		padding: 8px;
		min-width: 0;
		gap: 0;

		.kthb-link-products-label{
			display: none;
		}

		svg{
			width: 18px;
			height: 18px;
		}
	}

	.kthb-screen-head .kthb-screen-head__lead{
		font-size: 13px;
	}
}

@media only screen and (max-width: 768px) {
	#tags-products-table{
		.kthb-table{
			font-size: 12px;

			.post-tag{
				width: 28%;
			}

			.post-products{
				width: 44%;
			}

			.post-edit{
				width: 14%;
			}

			.post-remove{
				width: 14%;
			}

			tr{
				th,
				td{
					padding: 8px 4px;

					&:first-child{
						padding-inline-start: 10px;
					}

					&:last-child{
						padding-inline-end: 10px;
					}
				}

				th{
					padding-block: 12px;
					font-size: 12px;
				}

				th.post-edit,
				th.post-remove{
					font-size: 0;
					line-height: 0;
					color: transparent;
					overflow: hidden;
				}
			}

			.post-tag span{
				display: inline-block;
				max-width: 100%;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				font-size: 13px;
				font-weight: 600;
			}
		}

		.single-photo-products{
			gap: 8px;
			padding-block-start: 10px;

			.kthb-single-photo-thumbnail{
				width: 50px;

				img{
					width: 50px;
					border-radius: 6px;
				}
			}

			.kthb-linked-product-primary-badge{
				inset-block-start: -8px;
				font-size: 8px;
				padding: 1px 5px;
			}
		}

		.kthb-remove-tag{
			padding: 8px;
			display: inline-flex;
			align-items: center;
			justify-content: center;

			svg{
				width: 18px;
				height: 18px;
			}
		}

		td.post-edit,
		td.post-remove{
			text-align: center;
		}
	}
}

.kthb-post-image-cell{
	display: flex;
	align-items: center;
	gap: 8px;
}

.kthb-post-permalink{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	color: var(--kthb-text-secondary, #666);
	text-decoration: none;
	line-height: 0;

	svg{
		width: 16px;
		height: 16px;
		display: block;
	}

	.rtl & svg{
		transform: scaleX(-1);
	}

	&:hover{
		color: var(--kthb-text-primary, #1a1a1a);
		background: var(--kthb-surface-secondary, #f9f9f9);
	}
}

.kthb-single-photo-thumbnail {
	&{
		line-height: 0;
		display: block;
		position: relative;
		flex-shrink: 0;
	}

	.kthb-manage-post-media-open{
		appearance: none;
		-webkit-appearance: none;
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent;
		cursor: pointer;
		line-height: 0;
		display: inline-block;
	}
	
	img{
		width: 70px;
		object-fit: cover;
    border-radius: 8px;
    aspect-ratio: 4/5;
		background-color: #eee;
	}

	&.has-video .kthb-manage-post-media-open{
		position: relative;
		display: inline-block;
		width: 70px;
		aspect-ratio: 4/5;
		overflow: hidden;
		border-radius: 8px;
		background-color: #eee;
	}

	&.has-video img,
	&.has-video video{
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
		border-radius: 8px;
		transition: opacity 180ms ease;
	}

	&.has-video video{
		opacity: 0;
		pointer-events: none;
	}

	&.is-sideload-pending .kthb-manage-post-media-open{
		position: relative;
		display: inline-block;
	}

	.kthb-sideload-pending-mark{
		position: absolute;
		inset-block-end: 27px;
		inset-inline-start: 0;
    text-align: center;
    width: 100%;
		z-index: 1;
		display: inline-block;
		padding: 2px 6px;
		border-radius: 4px;
		background: rgba(0, 0, 0, 0.72);
		color: #fff;
		font-size: 10px;
		font-weight: 600;
		line-height: 1.3;
		letter-spacing: 0.02em;
		pointer-events: none;
	}
}

@media (hover: hover) {
	#products-table tr.has-video:hover .kthb-single-photo-thumbnail.has-video {
		img {
			opacity: 0;
		}

		video {
			opacity: 1;
		}
	}
}

.kthb-sideload-pending-msg{
	margin-top: 20px;
}

body.kthb-settings-modal-open .ts-dropdown{
	z-index: 10050 !important;
}

/* The picker's filters sit above the search box, which pushes the dropdown far
   enough down that a fixed 400px would run off a short phone. Tom Select never
   flips the dropdown upward, so size it to the viewport instead. */
@media only screen and (max-width: 768px) {
	body.kthb-settings-modal-open .ts-dropdown-content{
		max-height: 45vh;
	}
}


.kthb-remove-tag{
  color: red;
  padding: 10px;
  line-height: 0;
  vertical-align: middle;
}

.kthb-hub-modal-wrapper{
	display: flex;
	position: fixed;
	height: 100vh;
	width: 100%;
	left: 0;
	top: 0;
	bottom: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999 !important;
	align-items: center;
	flex-direction: column;
	padding-top: 5vh;
	box-sizing: border-box;
}

#kthb-settings-modal{
  max-width: 700px;
}

body:not(.kthb-settings-modal-open) #kthb-settings-modal-wrapper{
	display: none;
}

#kthb-settings-modal-wrapper:has(#kthb-settings-modal.has-link-media-preview){
	padding-top: 0;
	justify-content: center;
}

body:not(.kthb-float-video-picker-open) #kthb-float-video-picker-modal-wrapper{
	display: none;
}

.kthb-hub-modal-wrapper[hidden]{
	display: none !important;
}

.kthb-hub-modal{
	box-shadow: rgb(29 29 29 / 8%) 0px 30px 60px -12px, rgb(0 0 0 / 30%) 0px 18px 36px -18px;
	box-sizing: border-box;
	z-index: 1000 !important;
	width: 100%;
	margin: 0 40px;
	max-width: 600px;
	background: var(--kthb-surface);
	position: relative;
	border-radius: 20px;
	overflow-y: auto;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	font-size: 16px;
	min-height: 200px;
	color: var(--kthb-text-primary);

	@media only screen and (max-width: 768px) {
		width: calc(100% - 32px);
		max-width: none;
		margin: 0 16px;
		border-radius: 14px;
		max-height: 85vh;
	}
}

.kthb-hub-modal--wide{
	max-width: 980px;
}

.kthb-settings-modal-head,
.kthb-settings-modal-footer{
  border: 0px solid var(--kthb-border-color);
	border-bottom-width: 1px;
	padding: 15px;
  padding-inline-start: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;

	@media only screen and (max-width: 768px) {
		padding: 12px 14px;
	}
}

.kthb-settings-modal-head{
	h4,
	h2{
		font-weight: 500;
		font-size: 16px;
		margin: 0;

		@media only screen and (max-width: 768px) {
			font-size: 14px;
		}
	}

	&:has(.kthb-hub-modal-head-text){
		align-items: flex-start;
	}
}

.kthb-hub-modal-head-text{
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.kthb-hub-modal-subtitle{
	margin: 0;
	font-size: 13px;
	color: var(--kthb-text-secondary, #666);
}

.kthb-settings-modal-footer{
	border-top-width: 1px;
	border-bottom-width: 0;
	background-color: var(--kthb-surface-secondary);
	justify-content: flex-end;
	gap: 10px;
}

.kthb-hub-modal-close{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-sizing: border-box;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 8px;
	appearance: none;
	background: transparent !important;
	background-color: transparent !important;
	color: var(--kthb-text-secondary, #666) !important;
	cursor: pointer;
	line-height: 0;
	text-decoration: none !important;
	transition: color 0.12s ease, background 0.12s ease;

	svg{
		width: 20px;
		height: 20px;
		display: block;
		pointer-events: none;
	}

	&:hover,
	&:focus,
	&:focus-visible,
	&:active{
		color: var(--kthb-text-primary, #1a1a1a) !important;
		background: rgba(0, 0, 0, 0.06) !important;
		background-color: rgba(0, 0, 0, 0.06) !important;
		border: 0 !important;
		outline: none;
		text-decoration: none !important;
	}

	&:disabled,
	&[aria-disabled="true"]{
		opacity: 0.35;
		cursor: not-allowed;
	}

	&:disabled:hover,
	&:disabled:focus,
	&:disabled:focus-visible,
	&:disabled:active,
	&[aria-disabled="true"]:hover,
	&[aria-disabled="true"]:focus,
	&[aria-disabled="true"]:focus-visible,
	&[aria-disabled="true"]:active{
		color: var(--kthb-text-secondary, #666) !important;
		background: transparent !important;
		background-color: transparent !important;
	}
}

.kthb-dark-mode .kthb-hub-modal-close{
	color: var(--kthb-text-secondary, #a0a0a0) !important;

	&:hover,
	&:focus,
	&:focus-visible,
	&:active{
		color: var(--kthb-text-primary, #f0f0f0) !important;
		background: rgba(255, 255, 255, 0.12) !important;
		background-color: rgba(255, 255, 255, 0.12) !important;
	}

	&:disabled:hover,
	&:disabled:focus,
	&:disabled:focus-visible,
	&:disabled:active,
	&[aria-disabled="true"]:hover,
	&[aria-disabled="true"]:focus,
	&[aria-disabled="true"]:focus-visible,
	&[aria-disabled="true"]:active{
		color: var(--kthb-text-secondary, #a0a0a0) !important;
		background: transparent !important;
		background-color: transparent !important;
	}
}

.kthb-hub-modal-body,
#kthb-settings-modal-content,
#kthb-float-video-picker-modal-content{
	padding: 20px;

	.katheeb-option{
		padding: 0;

		&:last-child{
			margin-bottom: 0;
		}
	}

	.katheeb-settings-title{
    margin-bottom: 0;
	}

	.kthb-ts-prod-chip img{
		width: 80px !important;
	}

	@media only screen and (max-width: 768px) {
		padding: 12px 14px;

		.katheeb-option{
			margin-bottom: 12px;
		}

		.katheeb-settings-title{
			font-size: 14px;
			margin-inline-end: 0 !important;
			margin-bottom: 8px;
		}

		.kthb-ts-prod-chip img{
			width: 40px !important;
		}

		.ts-wrapper .ts-control{
			padding: 4px !important;
			gap: 4px;
		}

		.ts-wrapper.multi .ts-control [data-value]{
			margin: 2px !important;
		}
	}
}

.kthb-product-filters{
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;

	.kthb-product-filter{
		/* Zero basis so each control gets an equal share of the row, whatever
		   the label or option text width. */
		flex: 1 1 0;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 6px;
	}

	.kthb-product-filter label{
		font-size: 13px;
		font-weight: 600;
	}

	.kthb-product-filter select{
		width: 100%;
		padding: 8px 10px;
		border: 1px solid #dcdcde;
		border-radius: 4px;
		background-color: #fff;
		font-size: 14px;
	}

	/* An active dropdown should not read as a neutral one: it is the thing the
	   merchant forgot they set. */
	.kthb-product-filter.is-active select{
		border-color: #2271b1;
		background-color: #f0f6fc;
		font-weight: 600;
	}

	.kthb-product-filter-count{
		flex-basis: 100%;
		font-size: 13px;
		opacity: .75;
	}

	.kthb-product-filter-count.is-zero{
		color: #b32d2e;
		opacity: 1;
		font-weight: 600;
	}

	.kthb-product-filter-summary{
		flex-basis: 100%;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 6px;
		margin: 0;
		font-size: 13px;
		line-height: 1.9;
	}

	.kthb-filter-chip{
		display: inline-flex;
		align-items: center;
		gap: 4px;
		padding-block: 2px;
		/* Logical, so the tighter side stays next to the remove button in RTL. */
		padding-inline: 10px 4px;
		border: 1px solid transparent;
		border-radius: 999px;
		font-weight: 600;
		white-space: nowrap;
	}

	.kthb-filter-chip--category{
		border-color: var(--kthb-tone-info-border);
		background-color: var(--kthb-tone-info-bg);
		color: var(--kthb-tone-info-fg);
	}

	.kthb-filter-chip--status.is-status-sale{
		border-color: var(--kthb-tone-success-border);
		background-color: var(--kthb-tone-success-bg);
		color: var(--kthb-tone-success-fg);
	}

	.kthb-filter-chip--status.is-status-out{
		border-color: var(--kthb-tone-warning-border);
		background-color: var(--kthb-tone-warning-bg);
		color: var(--kthb-tone-warning-fg);
	}

	.kthb-filter-chip--status.is-status-hidden{
		border-color: var(--kthb-tone-neutral-border);
		background-color: var(--kthb-tone-neutral-bg);
		color: var(--kthb-tone-neutral-fg);
	}

	.kthb-filter-chip-remove{
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 18px;
		height: 18px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		color: inherit;
		cursor: pointer;
		opacity: .65;
	}

	.kthb-filter-chip-remove:hover,
	.kthb-filter-chip-remove:focus-visible{
		background-color: rgb(0 0 0 / .1);
		opacity: 1;
	}

	@media only screen and (max-width: 768px) {
		gap: 8px;
		margin-bottom: 12px;
	}
}

/* The dropdown is parented to body, so it sits outside .kthb-product-filters. */
.kthb-ts-filtered-empty{
	color: var(--kthb-tone-warning-fg);
}

/* Wider shell only for the two screens carrying the product picker; the float
   video picker shares #kthb-settings-modal and stays at the default width. */
#kthb-settings-modal.has-product-picker{
	max-width: 980px;
}

#kthb-link-media-preview{
	display: none;
}

#kthb-link-media-preview-inner{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 0;
  border-radius: 14px;
}

.kthb-link-media-preview-el{
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	background: #111;
}

img.kthb-link-media-preview-el{
	object-fit: contain;
}

#kthb-link-media-caption{
	min-height: 0;
	padding: 10px 12px 12px;
	overflow: hidden;
	background: var(--kthb-surface);
}

#kthb-link-media-caption[hidden]{
	display: none;
}

.kthb-link-media-caption-title{
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
}

#kthb-link-media-caption-text{
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.kthb-link-products-hint{
	display: none;
}

@media only screen and (min-width: 769px) {
	.kthb-settings-modal-footer:has(.kthb-link-products-hint){
		justify-content: space-between;
		align-items: center;
		gap: 28px;
	}

	.kthb-link-products-hint{
		display: flex;
		align-items: center;
		gap: 8px;
		flex: 1 1 auto;
		min-width: 0;
		max-width: 85ch;
		margin: 0;
		padding: 0;
		background: none;
		color: var(--kthb-tip-fg);
		font-size: 13px;
		line-height: 1.5;
		text-align: start;
	}

	.kthb-link-products-hint__icon{
		flex: 0 0 auto;
		display: inline-flex;
		margin-block-start: 1px;
		line-height: 0;
		color: inherit;
	}

	.kthb-link-products-hint__icon svg{
		width: 16px;
		height: 16px;
	}

	.kthb-link-products-hint__text{
		margin: 0;
		min-width: 0;
		font-size: 13px;
		line-height: 1.5;
	}
}

@media only screen and (min-width: 769px) {
	#kthb-settings-modal.has-product-picker.has-link-media-preview{
		max-width: 1100px;
		height: min(85vh, calc(100vh - 40px));
		max-height: min(85vh, calc(100vh - 40px));
		overflow: hidden;
		display: grid;
		grid-template-columns: 300px minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"head head"
			"media content"
			"footer footer";
	}

	#kthb-settings-modal.has-link-media-preview .kthb-settings-modal-head{
		grid-area: head;
	}

	#kthb-settings-modal.has-link-media-preview #kthb-link-media-preview{
		grid-area: media;
		display: flex;
		flex-direction: column;
		align-self: stretch;
		align-items: stretch;
		min-height: 0;
		width: 300px;
		padding: 20px;
		background: var(--kthb-surface);
		border-inline-end: 1px solid var(--kthb-border-color);
		overflow: hidden;
	}

	#kthb-settings-modal.has-link-media-preview #kthb-link-media-preview-inner{
		flex: none;
		width: 100%;
		aspect-ratio: 9 / 16;
		overflow: hidden;
		background: #111;
	}

	#kthb-settings-modal.has-link-media-preview #kthb-link-media-caption{
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
	}

	#kthb-settings-modal.has-link-media-preview #kthb-settings-modal-content{
		grid-area: content;
		display: flex;
		flex-direction: column;
		min-height: 0;
		overflow: hidden;
	}

	#kthb-settings-modal.has-link-media-preview .kthb-product-picker{
		flex: 1 1 auto;
		min-height: 0;
		align-items: stretch;
		height: 100%;
	}

	#kthb-settings-modal.has-link-media-preview .kthb-product-picker-section{
		display: flex;
		flex-direction: column;
		min-height: 0;
    padding-block: 20px;
	}

	#kthb-settings-modal.has-link-media-preview .kthb-linked-products-list{
		flex: 1 1 auto;
		max-height: none;
		min-height: 0;
		overflow-y: auto;
	}

	#kthb-settings-modal.has-link-media-preview .kthb-settings-modal-footer{
		grid-area: footer;
	}

	#kthb-settings-modal.has-link-media-preview > .kthb-loading-spinner{
		grid-area: 1 / 1 / -1 / -1;
	}
}

@media only screen and (max-width: 768px) {
	#kthb-link-media-preview{
		display: none !important;
	}
}

/* Editing a relation locks the tag select: the tag is the key the products are
   saved under, so it is shown rather than changed. Tom Select toggles a `locked`
   class but ships no styling for it. */
#tag-item .ts-wrapper.locked .ts-control{
	background-color: var(--kthb-surface-secondary, #f5f5f5);
	cursor: default;
}

#tag-item .ts-wrapper.locked.single .ts-control:after{
	display: none;
}

/* A tag that already has products linked. Reached through its own class because
   the dropdown is parented to body, out of reach of any wrapper selector. */
.kthb-tag-option-taken{
	opacity: .5;
	cursor: not-allowed;
}

.kthb-tag-option-note{
	font-size: 12px;
	font-style: italic;
}

.kthb-product-picker{
	/* Two columns so the results dropdown, which Tom Select sizes to the search
	   control, can never cover the linked products list. */
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px;
	align-items: start;

	&.is-loading .kthb-product-picker-section:first-child{
		opacity: 0.55;
		pointer-events: none;
	}

	/* Selected products live in the Linked products list beside the search, so
	   the control is left as a plain search box. Scoped to this picker: the
	   wizard still shows its chips in-control. */
	.ts-wrapper.multi .ts-control > .item{
		display: none !important;
	}

	.kthb-product-picker-section + .kthb-product-picker-section{
		padding-inline-start: 20px;
		border-inline-start: 1px solid var(--kthb-input-border, #d0d0d0);
	}

	.kthb-product-picker-title{
		display: flex;
		align-items: center;
		gap: 8px;
		margin: 0 0 14px;
		font-size: 15px;
		font-weight: 600;
	}

	/* Now the search field's label rather than the column heading, so it matches
	   the filter labels and hugs the input instead of floating above the block. */
	.kthb-product-picker-title.is-search-label{
		margin-bottom: 6px;
		font-size: 13px;
	}

	.kthb-linked-products-count{
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 24px;
		padding: 2px 7px;
		border-radius: 999px;
		background-color: var(--katheeb-light-hover, #f0f0f1);
		font-size: 12px;
		font-weight: 600;
		line-height: 1.6;
	}

	.kthb-linked-products-list{
		list-style: none;
		margin: 0;
		padding: 0;
		max-height: 320px;
		overflow-y: auto;
	}

	.kthb-linked-products.is-empty .kthb-linked-products-list{
		display: none;
	}

	.kthb-linked-products:not(.is-empty) .kthb-linked-products-empty{
		display: none;
	}

	.kthb-linked-products-empty{
		margin: 0;
		font-size: 14px;
		opacity: .7;
	}

	.kthb-linked-product{
		display: flex;
		align-items: stretch;
		gap: 12px;
		margin: 0;
		padding: 8px;
		border: 1px solid var(--kthb-input-border, #d0d0d0);
		border-radius: 10px;
	}

	.kthb-linked-product + .kthb-linked-product{
		margin-top: 8px;
	}

	/* Confirms the pick landed in the list, since the search control shows no
	   chip of its own. The class is dropped once the animation has run. */
	.kthb-linked-product.is-just-added{
		animation: kthb-linked-product-flash 1.2s ease-out both;
	}

	.kthb-linked-product-thumb-link{
		flex: none;
		line-height: 0;
	}

	.kthb-linked-product-thumb{
		flex: none;
		display: block;
		width: 48px;
		height: auto;
		aspect-ratio: 4 / 5;
		object-fit: cover;
		border-radius: 5px;
	}

	.kthb-linked-product-meta{
		flex: 1 1 auto;
		min-width: 0;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
    justify-content: space-between;
		gap: 6px;
		padding-top: 2px;
	}

	.kthb-linked-product-name{
		display: block;
		max-width: 100%;
		font-size: 12px;
    font-weight: 500;
		line-height: 1.4;
		color: inherit;
		text-decoration: none;
	}

	a.kthb-linked-product-name:hover,
	a.kthb-linked-product-name:focus-visible{
		text-decoration: underline;
	}

	.kthb-linked-product-primary{
		display: inline-flex;
		align-items: center;
		gap: 6px;
		max-width: 100%;
		margin: 0;
		padding: 4px 9px;
		border-radius: 999px;
		background: var(--kthb-tone-neutral-bg);
		color: var(--kthb-tone-neutral-fg);
		font-size: 12px;
		font-weight: 500;
		line-height: 1.35;
		cursor: pointer;
		user-select: none;
		transition: background-color .15s ease, color .15s ease;
	}

	.kthb-linked-product-primary.is-primary,
	.kthb-linked-product-primary:has(.kthb-linked-product-primary-input:checked){
		background: var(--kthb-tone-success-bg);
		color: var(--kthb-tone-success-fg);
	}

	.kthb-linked-product-primary-input{
		flex: none;
		margin: 0;
		accent-color: var(--kthb-tone-success-fg);
	}

	.kthb-linked-product-primary-text{
		min-width: 0;
	}

	.kthb-linked-product-remove{
		flex: none;
		align-self: center;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 30px;
		height: 30px;
		padding: 0;
		border: 0;
		border-radius: 4px;
		background: none;
		color: inherit;
		cursor: pointer;
		opacity: .6;
	}

	.kthb-linked-product-remove:hover,
	.kthb-linked-product-remove:focus-visible{
		background-color: var(--katheeb-light-hover, #f0f0f1);
		opacity: 1;
	}

	@media only screen and (max-width: 900px) {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;

		.kthb-product-picker-section + .kthb-product-picker-section{
			margin-top: 24px;
			padding-top: 20px;
			padding-inline-start: 0;
			border-inline-start: 0;
			border-top: 1px solid var(--kthb-input-border, #d0d0d0);
		}
	}

	@media only screen and (max-width: 768px) {
		.kthb-product-picker-section + .kthb-product-picker-section{
			margin-top: 16px;
			padding-top: 14px;
		}

		.kthb-product-picker-title{
			margin-bottom: 10px;
			font-size: 14px;
		}

		.kthb-linked-products-list{
			max-height: 220px;
		}

		.kthb-linked-product-thumb{
			width: 36px;
		}
	}
}

@keyframes kthb-linked-product-flash{
	0%, 40%{
		border-color: #00b259;
		background-color: rgba(0, 178, 89, .14);
	}
	100%{
		border-color: var(--kthb-input-border, #d0d0d0);
		background-color: transparent;
	}
}


.katheeb-option-video_picker{
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;

	.katheeb-settings-title{
		flex: 0 0 auto;
		max-width: 50%;
		margin-inline-end: 5px;
	}

	.kthb-float-video-picker{
		display: flex;
		align-items: center;
		gap: 12px;
		margin-inline-start: auto;
		width: auto;
		max-width: none;
	}
}

.kthb-float-video-picker-preview{
	width: 56px;
	height: 74px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--kthb-border-color, #e5e5e5);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;

	img{
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
	}

	.kthb-float-video-picker-placeholder{
		display: block;
		width: 100%;
		height: 100%;
		background:
			linear-gradient(135deg, transparent 46%, rgba(0,0,0,.08) 46%, rgba(0,0,0,.08) 54%, transparent 54%),
			var(--kthb-border-color, #e5e5e5);
	}
}

.kthb-float-video-pick-btn{
	white-space: nowrap;
	flex-shrink: 0;
}

#kthb-float-video-picker-modal.kthb-float-video-picker-dialog{
	max-width: 720px;
	/* Keep head/footer pinned; only the grid scrolls (same idea as link-products modal). */
	overflow: hidden;

	> .kthb-settings-modal-head,
	> .kthb-float-video-picker-footer{
		flex-shrink: 0;
	}

	> #kthb-float-video-picker-modal-content{
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
	}

	.kthb-settings-modal-footer{
		display: none;
	}

	&.is-multi .kthb-settings-modal-footer,
	&.is-multi .kthb-float-video-picker-footer{
		display: flex;
	}
}

.kthb-float-video-picker-footer{
	display: none;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.kthb-float-video-picker-selected-count{
	font-size: 14px;
	font-weight: 600;
	color: var(--kthb-text-secondary, #666);
	line-height: 1.3;
}

.kthb-float-video-picker-preview.is-multi{
	display: flex;
	align-items: center;
	gap: 4px;
	width: auto;
	min-width: 56px;
	height: 74px;
	padding: 0 4px;
	position: relative;

	img{
		width: 28px;
		height: 42px;
		border-radius: 4px;
		object-fit: cover;
	}

	.kthb-float-video-picker-count{
		position: absolute;
		top: 4px;
		inset-inline-end: 4px;
		min-width: 18px;
		height: 18px;
		padding: 0 5px;
		border-radius: 999px;
		background: var(--katheeb-primary-color-darker, #9ed5c8);
		color: #111;
		font-size: 11px;
		font-weight: 700;
		line-height: 18px;
		text-align: center;
		z-index: 1;
	}
}

.kthb-float-video-grid{
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 25px;
	padding: 4px 0 8px;
}

.kthb-float-video-grid-thumb{
	display: block;
	position: relative;
	aspect-ratio: 3 / 4;
	background: var(--kthb-border-color, #e5e5e5);
	overflow: hidden;
	border-radius: 12px;
	box-shadow: 0 0 0 1px var(--kthb-border-color, #ededed);
	transition: box-shadow .18s ease;

	img,
	video{
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
		transition: transform .22s ease, opacity .18s ease;
	}

	video{
		position: absolute;
		inset: 0;
		opacity: 0;
		pointer-events: none;
		background: #000;
	}

	/* Hover dim overlay */
	&::after{
		content: '';
		position: absolute;
		inset: 0;
		background: linear-gradient(to top, rgba(0, 0, 0, .28), transparent 45%);
		opacity: 0;
		transition: opacity .18s ease;
		pointer-events: none;
		z-index: 1;
	}

	/* Selected check badge */
	&::before{
		content: '';
		position: absolute;
		top: 8px;
		inset-inline-end: 8px;
		width: 24px;
		height: 24px;
		border-radius: 50%;
		background:
			url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' stroke='%23004d5b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
			var(--katheeb-primary-color, #baefe3);
		box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
		opacity: 0;
		transform: scale(.7);
		transition: opacity .18s ease, transform .18s ease;
		z-index: 2;
		pointer-events: none;
	}
}

.kthb-float-video-grid-item{
	appearance: none;
	border: none;
	background: transparent !important;
	padding: 0;
	margin: 0;
	cursor: pointer;
	border-radius: 12px;
	text-align: start;
	color: inherit;
	overflow: visible;
	transition: transform .18s ease;

	&:hover,
	&:focus-visible{
		transform: translateY(-2px);
		outline: none;

		.kthb-float-video-grid-thumb{
			box-shadow:
				0 0 0 2px var(--kthb-surface, #fff),
				0 0 0 4px var(--katheeb-primary-color, #baefe3),
				0 10px 22px rgba(0, 0, 0, .12);

			&::after{
				opacity: 1;
			}

			img{
				transform: scale(1.04);
			}
		}

		.kthb-float-video-grid-label{
			color: var(--kthb-text-primary, #1a1a1a);
		}
	}

	&.is-playing{
		.kthb-float-video-grid-thumb{
			&::after{
				opacity: 0;
			}

			video{
				opacity: 1;
			}

			img{
				opacity: 0;
			}
		}
	}

	&.is-selected{
		.kthb-float-video-grid-thumb{
			box-shadow:
				0 0 0 2px var(--kthb-surface, #fff),
				0 0 0 4px var(--katheeb-primary-color-darker, #9ed5c8),
				0 8px 18px rgba(0, 0, 0, .1);

			&::before{
				opacity: 1;
				transform: scale(1);
			}
		}

		.kthb-float-video-grid-label{
			font-weight: 600;
			color: var(--kthb-text-primary, #1a1a1a);
		}
	}

	&.is-selected:hover,
	&.is-selected:focus-visible{
		.kthb-float-video-grid-thumb{
			box-shadow:
				0 0 0 2px var(--kthb-surface, #fff),
				0 0 0 4px var(--katheeb-primary-color-darker, #9ed5c8),
				0 12px 24px rgba(0, 0, 0, .14);
		}
	}
}

.kthb-float-video-grid-label{
	display: block;
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.3;
	padding: 0 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--kthb-text-secondary, #666);
	transition: color .15s ease, font-weight .15s ease;
}

.kthb-float-video-grid-empty{
	margin: 20px 0;
	text-align: center;
	opacity: .7;
}

@media (max-width: 640px){
	.kthb-float-video-grid{
		grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
	}
}

.single-photo-products{
	display: flex;
  flex-wrap: wrap;
	gap: 10px;
	padding-block-start: 10px;

  .kthb-single-photo-thumbnail{
    position: relative;
    width: 50px;
  }

  button.kthb-single-photo-thumbnail{
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    line-height: 0;
  }

  .kthb-single-photo-thumbnail img{
    width: 50px;
    border-radius: 6px;
  }

  .kthb-single-photo-thumbnail.is-primary-product{
    outline: 2px solid var(--kthb-tone-success-border);
    outline-offset: 1px;
    border-radius: 6px;
  }
}

/* Shared Primary badge (Manage Posts cell + product-posts modal thumbs). */
.kthb-linked-product-primary-badge{
	position: absolute;
	inset-block-start: -8px;
	left: 50%;
	z-index: 1;
	max-width: calc(100% + 12px);
	padding: 1px 6px;
	border-radius: 999px;
	border: 1px solid var(--kthb-tone-success-border);
	background: var(--kthb-tone-success-bg);
	color: var(--kthb-tone-success-fg);
	font-size: 9px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.02em;
	white-space: nowrap;
	pointer-events: none;
	transform: translateX(-50%);
}

body:not(.kthb-product-posts-modal-open) #kthb-product-posts-modal-wrapper{
	display: none;
}

/* Same dialog chrome as Choose Videos (Reels / Stories). */
#kthb-product-posts-modal.kthb-product-posts-dialog{
	max-width: 720px;
	overflow: hidden;

	> .kthb-settings-modal-head,
	> .kthb-product-posts-summary,
	> .kthb-product-posts-footer{
		flex-shrink: 0;
	}

	> #kthb-product-posts-modal-content{
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
	}
}

.kthb-product-posts-footer{
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.kthb-product-posts-summary{
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px 12px;
}

.kthb-product-posts-summary__thumb{
	/* Match Linked Products picker thumbs (4:5). */
	flex: none;
	display: block;
	width: 48px;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 5px;
	background: var(--kthb-surface-secondary);
}

.kthb-product-posts-summary__meta{
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.kthb-product-posts-summary__name{
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--kthb-text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kthb-product-posts-summary__store{
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--kthb-text-secondary, #666);
	text-decoration: none;
}

.kthb-product-posts-summary__store:hover,
.kthb-product-posts-summary__store:focus-visible{
	color: var(--kthb-text-primary);
	text-decoration: underline;
}

#kthb-product-posts-list .kthb-product-posts-grid-item{
	cursor: default;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

#kthb-product-posts-list .kthb-product-posts-grid-item.is-hidden{
	opacity: 0.55;
}

/* No Choose-Videos select checkmark — delete is explicit. */
#kthb-product-posts-list .kthb-product-posts-grid-item .kthb-float-video-grid-thumb::before{
	display: none;
}

#kthb-product-posts-list .kthb-product-posts-grid-item:hover,
#kthb-product-posts-list .kthb-product-posts-grid-item:focus-visible{
	transform: none;
}

#kthb-product-posts-list .kthb-product-posts-grid-item:hover .kthb-float-video-grid-thumb,
#kthb-product-posts-list .kthb-product-posts-grid-item:focus-visible .kthb-float-video-grid-thumb{
	box-shadow: 0 0 0 1px var(--kthb-border-color, #ededed);
}

#kthb-product-posts-list .kthb-product-posts-grid-item.is-playing:hover .kthb-float-video-grid-thumb,
#kthb-product-posts-list .kthb-product-posts-grid-item.is-playing:focus-visible .kthb-float-video-grid-thumb{
	box-shadow: 0 0 0 1px var(--kthb-border-color, #ededed);
}

#kthb-product-posts-list .kthb-float-video-grid-thumb .kthb-linked-product-primary-badge{
	inset-block-start: 8px;
	inset-inline-start: 8px;
	inset-inline-end: auto;
	left: auto;
	transform: none;
}

/* Same Assign-as-primary pill + checkbox as Link Products. */
#kthb-product-posts-modal .kthb-linked-product-primary{
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 6px;
	max-width: 100%;
	margin: 8px 2px 0;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--kthb-tone-neutral-bg);
	color: var(--kthb-tone-neutral-fg);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	cursor: pointer;
	user-select: none;
	transition: background-color .15s ease, color .15s ease;
}

#kthb-product-posts-modal .kthb-linked-product-primary.is-primary,
#kthb-product-posts-modal .kthb-linked-product-primary:has(.kthb-product-posts-primary-input:checked){
	background: var(--kthb-tone-success-bg);
	color: var(--kthb-tone-success-fg);
}

#kthb-product-posts-modal .kthb-product-posts-primary-input{
	flex: none;
	margin: 0;
	accent-color: var(--kthb-tone-success-fg);
}

#kthb-product-posts-modal .kthb-product-posts-delete{
	align-self: stretch;
	margin-top: 8px;
	width: 100%;
}

#kthb-product-posts-modal.is-loading .kthb-hub-modal-body,
#kthb-product-posts-modal.is-loading .kthb-product-posts-summary,
#kthb-product-posts-modal.is-loading .kthb-settings-modal-footer{
	opacity: 0.45;
	pointer-events: none;
}

.kthb-table-footer{
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

/* Import more / importing / error: stay on the same row as pagination. */
.kthb-table-footer .kthb-manage-posts-import-footer:not(.kthb-library-upgrade-callout){
	margin-inline-start: auto;
	flex: 0 1 auto;
}

/*
 * Upgrade / Meta-connect: full-width second row under pagination
 * (flex-basis 100% forces the wrap; Import more does not use this class).
 */
.kthb-table-footer .kthb-library-upgrade-callout{
	margin-inline-start: 0;
	flex: 1 1 100%;
	width: 100%;
	box-sizing: border-box;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--kthb-surface-secondary);
	border: 1px solid var(--kthb-border-color);
	border-radius: 8px;
}

.kthb-table-footer .kthb-library-upgrade-callout .kthb-library-upgrade-callout__text{
	flex: 1 1 auto;
	min-width: 0;
	color: var(--kthb-text-primary);
}

.kthb-table-footer .kthb-library-upgrade-callout .kthb-button,
.kthb-table-footer .kthb-library-upgrade-callout .kthb-social-connect{
	flex-shrink: 0;
}

.kthb-manage-posts-import-footer,
.kthb-library-upgrade-callout{
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 240px;
	min-width: 0;
}

.kthb-manage-posts-import-footer__text,
.kthb-library-upgrade-callout__text{
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--kthb-text-secondary, var(--kthb-text-primary));
}

.kthb-plan-usage-modal__library-upgrade{
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--kthb-border-color);
}

@media (max-width: 640px){
	.kthb-table-footer{
		flex-direction: column;
		align-items: stretch;
	}

	.kthb-table-footer .kthb-manage-posts-import-footer:not(.kthb-library-upgrade-callout),
	.kthb-table-footer .kthb-library-upgrade-callout{
		margin-inline-start: 0;
		flex-direction: column;
		align-items: flex-start;
	}

	.kthb-table-footer .katheeb-pages{
		justify-content: flex-start;
	}
}

.katheeb-pages{
	display: flex;
	gap: 5px;
	justify-content: start;
	align-items: center;
	flex-wrap: wrap;
	padding: 15px 0;

	a,
	.katheeb-pages__nav,
	.katheeb-pages__gap,
	.katheeb-pages__status{
		padding: 8px 12px;
		min-width: 20px;
		background-color: var(--kthb-surface);
		border: 1px solid var(--kthb-border-color);
		color: var(--kthb-text-primary);
		text-decoration: none;
		border-radius: 5px;
		box-sizing: border-box;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		line-height: 1.2;
	}

	.katheeb-pages__status{
		font-size: 13px;
		white-space: nowrap;
	}

	.katheeb-pages__gap{
		border-style: dashed;
		opacity: 0.7;
		cursor: default;
	}

	.katheeb-pages__nav.is-disabled{
		opacity: 0.45;
		cursor: default;
		pointer-events: none;
	}

	a{
		&.active,
		&:hover{
			/* Pair like primary CTAs so light skin keeps contrast
			   (color-bg + button-text-color were both dark on Salla). */
			background: var(--katheeb-button-bg-color, var(--katheeb-primary-color));
			color: var(--katheeb-button-text-color, #004d5b);
		}
	}
}

/* A row whose products are all gone from the catalog */
.kthb-no-linked-products{
	color: var(--kthb-text-secondary);
	font-size: 13px;
}



.customizer-is-open:not(.kthb-app-contained):not(.rtl){
  #kthb-social-float-btn{
    &.kthb-social-float-btn-position-bottom-left,
    &.kthb-social-float-btn-position-middle-left,
    &.kthb-social-float-btn-position-top-left{
      left: 425px !important;
    }
  }

  #kthb-float-video{
    &.kthb-float-video-position-bottom-left,
    &.kthb-float-video-position-middle-left,
    &.kthb-float-video-position-top-left{
      left: 425px !important;
    }
  }
}

.customizer-is-open.rtl:not(.kthb-app-contained){
  #kthb-social-float-btn{
    &.kthb-social-float-btn-position-bottom-right,
    &.kthb-social-float-btn-position-middle-right,
    &.kthb-social-float-btn-position-top-right{
      right: 425px !important;
    }
  }

  #kthb-float-video{
    &.kthb-float-video-position-bottom-right,
    &.kthb-float-video-position-middle-right,
    &.kthb-float-video-position-top-right{
      right: 425px !important;
    }
  }
}


kbd {
  font-family: Consolas, "Lucida Console", monospace;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 13px;
  margin: 2px;
  color: #555;
  cursor: pointer;
  font-weight: 600;
  background: black;
  color: #ddd;
  letter-spacing: 1px;
  -webkit-touch-callout: none;
  user-select: none;
}


/* ==========================================================================
   Dark Mode Toggle (account mini-menu item)
   ========================================================================== */

.kthb-dark-toggle {
  cursor: pointer;
  border: none;

  .kthb-dark-toggle-moon,
  .kthb-dark-toggle-sun {
    display: inline-flex;
    line-height: 0;
  }

  svg {
    width: 16px;
    height: 16px;
    display: block;
  }
}

/* Action-oriented colors: deep blue to go dark, amber to go light */
.kthb-mini-menu__item.kthb-dark-toggle.is-enable-dark,
.kthb-mini-menu__item.kthb-dark-toggle.is-enable-dark:hover {
  color: #1e3a5f;
}

.kthb-mini-menu__item.kthb-dark-toggle.is-enable-light,
.kthb-mini-menu__item.kthb-dark-toggle.is-enable-light:hover {
  color: #d97706;
}

.kthb-dark-mode .kthb-mini-menu__item.kthb-dark-toggle.is-enable-dark,
.kthb-dark-mode .kthb-mini-menu__item.kthb-dark-toggle.is-enable-dark:hover {
  color: #93c5fd;
}

.kthb-dark-mode .kthb-mini-menu__item.kthb-dark-toggle.is-enable-light,
.kthb-dark-mode .kthb-mini-menu__item.kthb-dark-toggle.is-enable-light:hover {
  color: #fbbf24;
}

/* Account card element visibility toggles (demo/admin only) */
.ig-hide-button_avatar .kthb-social-account-user-picture-wrapper { display: none !important; }
.ig-hide-verified_badge .kthb-social-account-user-info-verified-badge { display: none !important; }
.ig-hide-button_stats .kthb-social-account-stats { display: none !important; }
.ig-hide-button_stats .kthb-story-strip-subs { display: none !important; }
.ig-hide-button_follow .kthb-social-account-follow-button { display: none !important; }

#kthb-social-box.is-boxed{
  padding-inline: 20px;
}

/* Product sync modal (store card + shared import batch JS) */
body.kthb-product-sync-modal-open {
  overflow: hidden;
}

#kthb-product-sync-modal.kthb-hub-modal-wrapper {
  z-index: 100000 !important;
  padding-top: 0;
  justify-content: center;
}

.kthb-product-sync-modal__dialog {
  overflow: hidden;
  max-height: min(90vh, 640px);
  /* Hub chrome defaults to space-between + min-height; sync has no footer and would look stretched. */
  justify-content: flex-start;
  min-height: 0;
}

.kthb-product-sync-modal__inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.kthb-product-sync-modal__video {
  text-align: center;
  margin-bottom: 8px;
}

.kthb-product-sync-modal__video .wizard-mark {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: inline-block;
  background: transparent;
}

.kthb-product-sync-modal__title {
  margin: 0 0 8px;
  font-size: 18px;
  text-align: center;
  font-weight: 600;
}

.kthb-product-sync-modal__status {
  text-align: center;
  font-size: 14px;
  margin: 0 0 8px;
  min-height: 1.2em;
}

.kthb-product-sync-modal__hint {
  font-size: 12px;
  color: var(--kthb-text-secondary, #666);
  text-align: center;
  margin: 0 0 12px;
}

.kthb-product-sync-modal__progress {
  height: 6px;
  background: var(--kthb-input-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.kthb-product-sync-modal__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--katheeb-primary-color, #2271b1);
  transition: width 0.2s ease;
}

.kthb-product-sync-modal__pct {
  display: block;
  text-align: right;
  font-size: 12px;
  margin-bottom: 12px;
}

.kthb-product-sync-modal .wizard-import-items {
  max-height: 220px;
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
  margin: 0;
  border: 1px solid var(--kthb-input-border);
  border-radius: 8px;
}

.kthb-product-sync-modal .wizard-import-items ul {
  padding: 12px 12px 0;
  margin: 0;

	li {
		margin: 0;
		padding: 6px 10px;
		position: relative;
		transform: translate3d(0, -15px, 0);
		transition: 0.25s ease;
		list-style-type: none;
		display: flex;
		align-items: center;
		gap: 15px;
		font-size: 12px;
    color: var(--kthb-text-secondary);

		&:not(:last-child){
			border-bottom: 1px solid var(--kthb-input-border);
		}

		img{
			width: 40px;
			height: 40px;
			aspect-ratio: 1/1;
			object-fit: cover;
			border-radius: 100%;
      background-color: #eee;
		}
	}
}

.kthb-product-sync-modal__panel--done {
  text-align: center;
  padding: 8px 0 0;
}

.kthb-product-sync-modal__success svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: block;
}

.kthb-product-sync-modal__done-btn {
  margin: 16px auto 0;
  padding-inline: 40px;
}

/* ==========================================================================
   Shared mini-menu (app switcher, i18n picker, account menu)
   ========================================================================== */

.kthb-mini-menu {
  position: relative;
  flex-shrink: 0;
}

.kthb-mini-menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  color: inherit;
}

.kthb-mini-menu__panel {
  position: absolute;
  inset-block-start: calc(100% + 4px);
  inset-inline-end: 0;
  z-index: 102;
  min-width: 160px;
  padding: 6px;
  border-radius: 10px;
  background: var(--kthb-surface, #fff);
  border: 1px solid var(--kthb-border-color, #ddd);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.kthb-mini-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: start;
  text-decoration: none !important;
  color: var(--kthb-text-primary, inherit);
  white-space: nowrap;
  box-sizing: border-box;
}

.kthb-mini-menu__item:hover,
.kthb-mini-menu__item[aria-selected="true"] {
  background: rgba(0, 0, 0, 0.04);
  color: #333;
}

.kthb-mini-menu__item.is-danger {
  color: #d63638;
}

.kthb-mini-menu__item.is-danger:hover {
  background: rgba(214, 54, 56, 0.08);
  color: #d63638;
}

.kthb-mini-menu__item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.kthb-mini-menu__label {
  flex: 1 1 auto;
  min-width: 0;
}

.kthb-dark-mode .kthb-mini-menu__item:hover,
.kthb-dark-mode .kthb-mini-menu__item[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.12);
  color: var(--kthb-text-primary, #fff);
}

.kthb-dark-mode .kthb-mini-menu__item.is-danger,
.kthb-dark-mode .kthb-mini-menu__item.is-danger:hover {
  color: #f86368;
}

.kthb-dark-mode .kthb-mini-menu__item.is-danger:hover {
  background: rgba(248, 99, 104, 0.12);
}

/* Bilingual text field language control */
.kthb-i18n-field{
  width: 100%;
  max-width: 400px;
}

.kthb-i18n-control{
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--kthb-border-color, #ddd);
  border-radius: 8px;
  background: var(--kthb-surface, #fff);
  overflow: visible;
}

.kthb-i18n-control:focus-within{
  border-color: var(--kthb-primary, #2271b1);
  box-shadow: 0 0 0 1px var(--kthb-primary, #2271b1);
}

.kthb-i18n-visible{
  flex: 1 1 auto;
  min-width: 0;
  width: 100% !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  background: transparent !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
}

.kthb-i18n-control .kthb-mini-menu {
  flex-shrink: 0;
  align-self: stretch;
}

.kthb-i18n-lang-toggle{
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  flex-shrink: 0;
  border: 0;
  border-inline-start: 1px solid var(--kthb-border-color, #ddd);
  background: transparent;
  padding: 0 10px;
  margin: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;
  border-radius: 0 8px 8px 0;
}

.rtl .kthb-i18n-lang-toggle{
  border-inline-start: 0;
  border-inline-end: 1px solid var(--kthb-border-color, #ddd);
  border-radius: 8px 0 0 8px;
}

.kthb-i18n-lang-toggle:hover{
  background: rgba(0, 0, 0, 0.04);
  color: #333;
}

.kthb-i18n-lang-menu{
  min-width: 160px;
}

.kthb-i18n-flag{
  font-size: 16px;
  line-height: 1;
}

/* -------------------------------------------------------------------------
 * Per-app settings hub + layouts
 * ---------------------------------------------------------------------- */

/* The theme's page wrapper is empty on an app screen (the content filter blanks it) but its
   .site-main margin still left a 20px strip above the screen, so hide the whole wrapper. */
body.kthb-app-screen #page,
body.kthb-app-screen .katheeb-the-content > .grid-container:has(.kthb-dashboard-hero),
body.kthb-app-screen .kthb-dashboard-hero {
  display: none !important;
}

body.kthb-app-hub #katheeb-edit-button,
body.kthb-app-hub #the-demo-settings,
body.kthb-app-screen:not(.kthb-demo-extended) #katheeb-edit-button {
  display: none !important;
}

body.kthb-app-screen.kthb-demo-extended #katheeb-edit-button {
  display: flex !important;
}

.kthb-apps-hub {
  padding: 24px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.kthb-apps-hub__section {
  margin: 0;
}

.kthb-apps-hub__intro {
  margin-bottom: 10px;
}

.kthb-apps-hub__title {
  margin: 0 0 3px;
  font-size: 1.3rem;
  font-weight: 600;
}

.kthb-apps-hub__lead {
  margin: 0;
  color: var(--kthb-text-secondary);
  font-size: 0.75rem;
}

.kthb-apps-hub__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}

@media only screen and (max-width: 1100px) {
  .kthb-apps-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 640px) {
  .kthb-apps-hub__grid {
    grid-template-columns: 1fr;
  }
}

/* Hub mobile: quieter chrome, apps before dashboard hero */
@media only screen and (max-width: 768px) {
  body.kthb-app-hub .kthb-apps-hub__section--seasonal {
    display: none !important;
  }

  body.kthb-app-hub .katheeb-the-content {
    display: flex;
    flex-direction: column;
  }

  body.kthb-app-hub .kthb-apps-hub {
    order: 2;
  }

  body.kthb-app-hub #page {
    order: 3;
  }

  body.kthb-app-hub .site-footer {
    order: 4;
  }
}

/* Match .kthb-hero-card surface / radius; theme via --kthb-* vars */
.kthb-app-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid var(--kthb-border-color);
  border-radius: 16px;
  background: var(--kthb-surface);
  text-decoration: none !important;
  text-align: start;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.kthb-app-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  text-decoration: none !important;
}

.kthb-app-card:hover {
  border-color: var(--katheeb-primary-color-darker);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.kthb-app-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: #f1f1f1;
  overflow: hidden;
}

.kthb-app-card__media--empty {
  min-height: 120px;
}

.kthb-app-card__video,
.kthb-app-card__screenshot {
  display: block;
  width: auto;
  height: auto;
  border-radius: 8px;
  max-width: 85%;
  max-height: 78%;
  opacity: 0.6;
  object-fit: contain;
  pointer-events: none;
  filter: grayscale(1);
  transition: filter 0.2s ease;
}

.kthb-app-card:hover .kthb-app-card__video,
.kthb-app-card:hover .kthb-app-card__screenshot,
.kthb-app-card:focus-within .kthb-app-card__video,
.kthb-app-card:focus-within .kthb-app-card__screenshot {
  filter: none;
  opacity: 1;
}

.kthb-dark-mode .kthb-app-card__media {
  background: var(--kthb-surface-secondary);
}

.kthb-app-card__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 18px;
  position: relative;
}

.kthb-app-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kthb-app-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--kthb-text-secondary);
  flex-shrink: 0;
}

/* Same success token as .kthb-badge-success */
.kthb-app-card.is-on .kthb-app-card__status {
  background: var(--kthb-tone-success-bg);
  color: var(--kthb-tone-success-fg);
}

.kthb-app-card.is-off .kthb-app-card__status {
  background: rgba(0, 0, 0, 0.06);
  color: var(--kthb-text-secondary);
}

.kthb-app-card.is-disabled {
  cursor: default;
  filter: grayscale(0.15);
}

.kthb-app-card.is-disabled:hover {
  border-color: var(--kthb-border-color);
  box-shadow: none;
}

.kthb-app-card.is-disabled .kthb-app-card__status {
  background: rgba(0, 0, 0, 0.06);
  color: var(--kthb-text-secondary);
}

.kthb-app-card.is-disabled .kthb-app-card__icon,
.kthb-app-card.is-disabled .kthb-app-card__title,
.kthb-app-card.is-disabled .kthb-app-card__blurb,
.kthb-app-card.is-disabled .kthb-app-card__cta,
.kthb-app-card.is-disabled .kthb-app-card__video,
.kthb-app-card.is-disabled .kthb-app-card__screenshot {
  opacity: 0.72;
}

.kthb-app-card__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.kthb-app-card__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--kthb-text-primary);
  flex-shrink: 0;
}

.kthb-app-card__icon svg {
  width: 20px;
  height: 20px;
}

/* Per mini-app icon character (hub + analytics) */
.kthb-app-icon--feed {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}

.kthb-app-icon--pdp {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.kthb-app-icon--reels {
  background: rgba(219, 39, 119, 0.12);
  color: #db2777;
}

.kthb-app-icon--follow {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.kthb-app-icon--products {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.kthb-app-icon--upsale {
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
}

.kthb-app-icon--seasonal {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
}

.kthb-app-icon--stories {
  background: rgba(124, 58, 237, 0.14);
  color: #7c3aed;
}

.kthb-app-icon--national-day {
  background: rgba(27, 122, 61, 0.12);
  color: #1b7a3d;
}

.kthb-app-icon--ramadan {
  background: rgba(184, 149, 82, 0.22);
  color: #9a7040;
}

.kthb-app-icon--eid {
  background: rgba(64, 145, 108, 0.2);
  color: #2d6a4f;
}

.kthb-app-icon--black-friday {
  background: rgba(255, 209, 0, 0.28);
  color: #111111;
}

.kthb-dark-mode .kthb-app-icon--feed {
  background: rgba(129, 140, 248, 0.18);
  color: #a5b4fc;
}

.kthb-dark-mode .kthb-app-icon--pdp {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}

.kthb-dark-mode .kthb-app-icon--reels {
  background: rgba(244, 114, 182, 0.16);
  color: #f9a8d4;
}

.kthb-dark-mode .kthb-app-icon--follow {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.kthb-dark-mode .kthb-app-icon--products {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
}

.kthb-dark-mode .kthb-app-icon--upsale {
  background: rgba(251, 146, 60, 0.16);
  color: #fdba74;
}

.kthb-dark-mode .kthb-app-icon--seasonal {
  background: rgba(45, 212, 191, 0.16);
  color: #5eead4;
}

.kthb-dark-mode .kthb-app-icon--stories {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}

.kthb-dark-mode .kthb-app-icon--national-day {
  background: rgba(74, 222, 128, 0.16);
  color: #86efac;
}

.kthb-dark-mode .kthb-app-icon--ramadan {
  background: rgba(245, 230, 200, 0.2);
  color: #f5e6c8;
}

.kthb-dark-mode .kthb-app-icon--eid {
  background: rgba(110, 231, 183, 0.2);
  color: #6ee7b7;
}

.kthb-dark-mode .kthb-app-icon--black-friday {
  background: rgba(255, 209, 0, 0.22);
  color: #ffd100;
}

.kthb-app-card__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.kthb-app-card__blurb {
  display: block;
  color: var(--kthb-text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.kthb-app-card__date {
  color: var(--kthb-text-primary);
  font-weight: 700;
}

.kthb-app-card__cta {
  font-size: 12px;
  font-weight: 500;
}

.kthb-app-card__cta--muted {
  color: var(--kthb-text-secondary);
  font-weight: 400;
}

.kthb-app-card__cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.kthb-app-card.is-disabled .kthb-app-card__content {
  min-height: 160px;
}

.kthb-app-card__info {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: var(--kthb-surface);
  color: var(--kthb-text-secondary);
  line-height: 0;
  pointer-events: auto;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.kthb-app-card__info svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

.kthb-app-card__info:hover,
.kthb-app-card__info:focus-visible {
  color: var(--kthb-text-primary);
  background: var(--kthb-control-hover-bg, rgba(0, 0, 0, 0.06));
  outline: none;
}

.kthb-app-card__info--cta {
  position: static;
  inset: auto;
}

.kthb-dark-mode .kthb-app-card__info {
  background: var(--kthb-surface);
}

.kthb-dark-mode .kthb-app-card__info:hover,
.kthb-dark-mode .kthb-app-card__info:focus-visible {
  background: var(--kthb-control-hover-bg, rgba(255, 255, 255, 0.08));
}

body.kthb-app-info-modal-open {
  overflow: hidden;
}

.kthb-app-info-modal__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kthb-app-info-modal__media {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--kthb-surface-secondary);
  border: 1px solid var(--kthb-border-color);
}

.kthb-app-info-modal__video,
.kthb-app-info-modal__screenshot {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Author `display: block` beats UA `[hidden]` — keep inactive media collapsed. */
.kthb-app-info-modal__video[hidden],
.kthb-app-info-modal__screenshot[hidden] {
  display: none !important;
}

.kthb-app-info-modal__video {
  aspect-ratio: 16 / 9;
  max-height: min(52vh, 420px);
  object-fit: contain;
  background: #f1f1f1;
  pointer-events: none;
}

.kthb-app-info-modal__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--kthb-text-secondary);
}

.kthb-app-info-modal__available {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--kthb-text-secondary);
}

.kthb-app-info-modal__date {
  color: var(--kthb-text-primary);
  font-weight: 700;
}

.kthb-app-panel-head {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.kthb-app-panel-head__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.kthb-app-panel-head__crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.kthb-app-panel-head__crumb-sep {
  flex-shrink: 0;
  color: var(--kthb-text-secondary);
  opacity: 0.45;
  font-size: 13px;
  line-height: 1;
  user-select: none;
}

.kthb-app-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  text-decoration: none !important;
  color: var(--kthb-text-secondary);
  min-width: 0;
}

.kthb-app-back__arrow {
  flex-shrink: 0;
}

.rtl .kthb-app-back__arrow {
  transform: scaleX(-1);
}

.kthb-app-back:hover {
  color: var(--kthb-text-primary);
}

.kthb-app-panel-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.kthb-app-panel-head__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kthb-app-panel-head__row h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--kthb-text-primary);
  min-width: 0;
}

.kthb-app-panel-head__row .kthb-app-enable-switch {
  flex-shrink: 0;
  margin: 0;
}

/* 3-dot app switcher beside the back link */
.kthb-app-switcher {
  margin: 0;
}

.kthb-app-switcher__toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--kthb-text-secondary);
}

.kthb-app-switcher__toggle:hover,
.kthb-app-switcher__toggle[aria-expanded="true"] {
  color: var(--kthb-text-primary);
  background: rgba(0, 0, 0, 0.06);
}

.kthb-dark-mode .kthb-app-switcher__toggle:hover,
.kthb-dark-mode .kthb-app-switcher__toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
}

.kthb-app-switcher__icon {
  display: block;
}

.kthb-app-switcher__menu {
  min-width: 180px;
  border-radius: 12px;
}

.kthb-dark-mode {
  .kthb-app-card__status,
  .kthb-app-card.is-off .kthb-app-card__status{
    background: rgba(255, 255, 255, 0.12);
  }

  .kthb-app-card.is-on .kthb-app-card__status {
    background: var(--kthb-tone-success-bg);
    color: var(--kthb-tone-success-fg);
  }
}

/* Contained layout (Reels / Follow) */
body.kthb-app-contained.customizer-is-open .katheeb-the-main {
  display: block;
}

body.kthb-app-contained.customizer-is-open .katheeb-the-content {
  width: 100%;
}

body.kthb-app-contained #demo-panel {
  position: relative !important;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  max-height: none;
  top: 0;
  box-shadow: none !important;
  overflow: visible !important;
  overscroll-behavior: auto;
}

body.kthb-app-contained .kthb-panel-close {
  display: none !important;
}

body.kthb-app-contained #the-demo-settings {
  height: auto;
  width: 100%;
  overflow: visible;
}

.kthb-app-contained-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0 48px;
  align-items: start;
}

@media only screen and (max-width: 900px) {
  .kthb-app-contained-layout {
    grid-template-columns: 1fr;
  }

  /* Preview first so merchants see the live frame before scrolling into settings. */
  .kthb-app-contained-layout__preview {
    order: -1;
  }
}

.kthb-app-preview-frame {
  position: relative;
  min-height: 420px;
  border-radius: 16px;
  padding: 30px;
  border: 1px dashed var(--kthb-border-color);
  background: var(--kthb-surface-secondary);
  overflow: hidden;
}

/* The "page": widgets render inside it, so their offsets are measured from its edge. */
.kthb-app-preview-frame__chrome {
  position: absolute;
  inset: 12px;
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--kthb-border-color);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(0, 0, 0, 0.03) 8px,
    rgba(0, 0, 0, 0.03) 16px
  );
  pointer-events: none;
}

.kthb-app-preview-frame__chrome > * {
  pointer-events: auto;
}

.kthb-app-preview-hint {
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--kthb-text-secondary);
  line-height: 1.4;
}

.kthb-dark-mode .kthb-app-preview-frame__chrome {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255, 255, 255, 0.04) 8px,
    rgba(255, 255, 255, 0.04) 16px
  );
}

.kthb-app-preview-frame #kthb-float-video,
.kthb-app-preview-frame #kthb-social-float-btn {
  position: absolute !important;
  z-index: 2;
}

/* Contained corners must ignore the open-panel viewport clearance. */
.kthb-app-preview-frame #kthb-social-float-btn.kthb-social-float-btn-position-top-left,
.kthb-app-preview-frame #kthb-social-float-btn.kthb-social-float-btn-position-middle-left,
.kthb-app-preview-frame #kthb-social-float-btn.kthb-social-float-btn-position-bottom-left {
  left: var(--kthb-floating_button_offset_side, 20px) !important;
  right: auto !important;
}

.kthb-app-preview-frame #kthb-float-video.kthb-float-video-position-top-left,
.kthb-app-preview-frame #kthb-float-video.kthb-float-video-position-middle-left,
.kthb-app-preview-frame #kthb-float-video.kthb-float-video-position-bottom-left {
  left: var(--kthb-floating_video_offset_side, 20px) !important;
  right: auto !important;
}

.kthb-app-preview-frame #kthb-social-float-btn.kthb-social-float-btn-position-top-right,
.kthb-app-preview-frame #kthb-social-float-btn.kthb-social-float-btn-position-middle-right,
.kthb-app-preview-frame #kthb-social-float-btn.kthb-social-float-btn-position-bottom-right {
  right: var(--kthb-floating_button_offset_side, 20px) !important;
  left: auto !important;
}

.kthb-app-preview-frame #kthb-float-video.kthb-float-video-position-top-right,
.kthb-app-preview-frame #kthb-float-video.kthb-float-video-position-middle-right,
.kthb-app-preview-frame #kthb-float-video.kthb-float-video-position-bottom-right {
  right: var(--kthb-floating_video_offset_side, 20px) !important;
  left: auto !important;
}

body.kthb-app-contained #the-demo-settings:not(.is-mounted) {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

body.kthb-app-screen.kthb-demo-extended.customizer-is-open .katheeb-the-content {
  width: 100%;
}

body.kthb-app-screen.kthb-demo-extended #demo-panel,
body.kthb-app-screen.kthb-demo-extended #the-demo-settings {
  display: none !important;
}

/* PDP bulk-link gate (no linked products yet) */
.kthb-pdp-bulk-link-gate {
  margin: 24px auto 40px;
}

.kthb-pdp-bulk-link-gate .kthb-bulk-link-products {
  padding: 20px 22px 24px;
  background: var(--kthb-surface);
  border: 1px solid var(--kthb-border-color);
  border-radius: 16px;
  box-sizing: border-box;
}

.kthb-pdp-bulk-link-gate .kthb-bulk-link-products__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: var(--kthb-text-primary);
}

.kthb-pdp-bulk-link-gate .kthb-bulk-link-products__intro,
.kthb-pdp-bulk-link-gate .kthb-bulk-link-products__empty {
  margin: 0 0 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--kthb-text-secondary);
}

.kthb-pdp-bulk-link-gate .kthb-bulk-link-products__actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.kthb-pdp-bulk-link-gate .kthb-bulk-link-products__save.wizard-button-doing-action {
  pointer-events: none;
  opacity: 0.7;
}

/* Products With Videos — portal list / empty / demo preview */
.kthb-pv-bulk-link-gate {
  margin: 24px auto 40px;
}

.kthb-pv-list {
  margin: 24px auto 40px;
}

.kthb-pv-list__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.kthb-pv-list__head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.kthb-pv-empty {
  padding: 32px 24px;
  background: var(--kthb-surface);
  border: 1px solid var(--kthb-border-color);
  border-radius: 16px;
  text-align: center;
}

.kthb-pv-empty h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.kthb-pv-empty p {
  margin: 0 0 12px;
  color: var(--kthb-text-secondary, #5b5b5b);
  line-height: 1.5;
}

.kthb-pv-empty__hint {
  font-size: 13px;
  opacity: 0.9;
}

/* Match screen-header / Link Tags / bulk-link CTAs (base .kthb-button is block flex). */
.kthb-pv-empty__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.kthb-pv-empty__actions .kthb-button {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

#pv-widgets-table .kthb-table {
  table-layout: fixed;
  width: 100%;
}

#pv-widgets-table .post-title {
  width: 40%;
}

#pv-widgets-table .post-stats {
  width: 40%;
}

#pv-widgets-table .post-edit {
  width: 20%;
  text-align: end;
}

#pv-widgets-table .kthb-pv-widget-name {
  color: inherit;
  text-decoration: none;
}

#pv-widgets-table .kthb-pv-widget-name:hover {
  text-decoration: underline;
}

#pv-widgets-table .kthb-pv-widget-updated {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--kthb-text-secondary, #5b5b5b);
}

#pv-widgets-table .post-stats {
  font-size: 13px;
  color: var(--kthb-text-secondary, #5b5b5b);
}

#pv-widgets-table .kthb-pv-stat {
  display: inline-block;
  margin-inline-end: 12px;
  white-space: nowrap;
}

#pv-widgets-table .kthb-pv-stat strong {
  color: var(--kthb-text-primary, #111);
  font-weight: 600;
}

#pv-widgets-table tr.is-loading .kthb-visibility-toggle {
  pointer-events: none;
  opacity: 0.7;
}

.kthb-table-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kthb-table-row-actions .kthb-button {
  white-space: nowrap;
}

@media only screen and (max-width: 768px) {
	#pv-widgets-table{
		.kthb-table{
			font-size: 12px;

			tr{
				th,
				td{
					padding: 8px 5px;

					&:first-child{
						padding-inline-start: 5px;
					}

					&:last-child{
						padding-inline-end: 5px;
					}
				}

				th{
					padding-block: 12px;
					font-size: 12px;
				}
			}

			.post-location,
			.post-updated{
				display: none;
			}
		}

		.kthb-visibility-label{
			display: none;
		}

		.kthb-visibility-toggle{
			gap: 0;
			justify-content: center;
		}

		.kthb-table-row-actions{
			flex-direction: column;
			align-items: stretch;
			gap: 6px;
		}
	}
}

/* Products↔posts linking nudge — PDP preview + PV home (dashboard hero stays untouched) */
.kthb-pdp-preview-linking {
  margin: 20px auto 0;
}

.kthb-app-products .kthb-pdp-preview-linking {
  margin: 0 auto 35px;
}

.kthb-pdp-preview-linking .kthb-hero-card--linking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head cta"
    "body cta";
  gap: 8px 24px;
  align-items: center;
  padding: 16px 20px;
  background: var(--kthb-surface);
  border: 1px solid var(--kthb-border-color);
  border-radius: 16px;
}

.kthb-pdp-preview-linking .kthb-hero-card__head {
  grid-area: head;
  margin: 0;
}

.kthb-pdp-preview-linking .kthb-hero-card__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.kthb-pdp-preview-linking .kthb-hero-card__body {
  grid-area: body;
  min-width: 0;
}

.kthb-pdp-preview-linking .kthb-hero-card__foot {
  grid-area: cta;
  margin: 0;
  padding: 0;
  align-self: center;
  justify-content: center;
}

.kthb-pdp-preview-linking .kthb-hero-card__foot-note {
  display: none;
}

.kthb-pdp-preview-linking .kthb-hero-card__foot .kthb-button {
  white-space: nowrap;
}

.kthb-pdp-preview-linking .kthb-hero-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}

.kthb-pdp-preview-linking .kthb-hero-headline__value {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.kthb-pdp-preview-linking .kthb-hero-headline__meta {
  margin-top: 0;
}

.kthb-pdp-preview-linking .kthb-hero-meter {
  margin-top: 10px;
  max-width: 440px;
}

.kthb-pdp-preview-linking .kthb-hero-meter__track {
  height: 6px;
  background: color-mix(in srgb, var(--kthb-text-primary) 8%, transparent);
}

.kthb-pdp-preview-linking .kthb-hero-note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

@media only screen and (max-width: 720px) {
  .kthb-pdp-preview-linking .kthb-hero-card--linking {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "body"
      "cta";
    gap: 12px;
  }

  .kthb-pdp-preview-linking .kthb-hero-card__foot .kthb-button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

.kthb-dark-mode .kthb-pdp-preview-linking .kthb-hero-card--linking {
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--katheeb-primary-color) 14%, transparent) 0%, transparent 52%),
    var(--kthb-surface);
  box-shadow: none;
}

/* PDP dummy product preview — Salla-like storefront shell */
.kthb-pdp-demo {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  margin-bottom: 50px;
}

.kthb-pdp-demo-product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 32px 40px;
  align-items: start;
  background: var(--kthb-surface);
  border: 1px solid var(--kthb-border-color);
  border-radius: 16px;
  padding: 28px;
  color: var(--kthb-text-primary);
}

@media only screen and (max-width: 900px) {
  .kthb-pdp-demo-product {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }
}

.kthb-pdp-demo-slot-full {
  grid-column: 1 / -1;
}

.kthb-pdp-demo-gallery__frame {
  position: relative;
  border: 1px solid var(--kthb-border-color);
  border-radius: 10px;
  overflow: hidden;
  background: var(--kthb-surface);
}

.kthb-pdp-demo-gallery__actions {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kthb-pdp-demo-gallery__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--kthb-border-color);
  background: var(--kthb-surface);
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo-gallery__main {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(0, 0, 0, 0.04), transparent 45%),
    linear-gradient(160deg, #f7f7f8 0%, #eceef2 55%, #e4e7ec 100%);
}

.kthb-pdp-demo-gallery__main.has-image {
  background: var(--kthb-surface-secondary);
}

/* One slide at a time — author `display` rules beat UA `[hidden]`, so enforce hide. */
.kthb-pdp-demo-gallery__main > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.kthb-pdp-demo-gallery__main > [hidden] {
  display: none !important;
}

.kthb-pdp-demo-gallery__main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.kthb-dark-mode .kthb-pdp-demo-gallery__main {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.06), transparent 45%),
    linear-gradient(160deg, #333436 0%, #2a2b2d 100%);
}

.kthb-dark-mode .kthb-pdp-demo-gallery__main.has-image {
  background: var(--kthb-surface-secondary);
}

.kthb-pdp-demo-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.kthb-pdp-demo-gallery__thumbs span,
.kthb-pdp-demo-gallery__thumbs button {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  border: 1px solid var(--kthb-border-color);
  background-color: var(--kthb-surface-secondary);
  background-size: cover;
  background-position: center;
  display: block;
  box-sizing: border-box;
  flex: 0 0 auto;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.kthb-pdp-demo-gallery__thumbs span.is-active,
.kthb-pdp-demo-gallery__thumbs .is-active {
  border-width: 2px;
  border-color: var(--kthb-text-primary);
}

.kthb-pdp-demo-gallery.is-photos-grid .kthb-pdp-demo-gallery__frame,
.kthb-pdp-demo-gallery.is-photos-grid-after .kthb-pdp-demo-gallery__frame {
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

.kthb-pdp-demo-below-gallery {
  margin-top: 16px;
  width: 100%;
  min-width: 0;
}

.kthb-pdp-demo-below-gallery > #kthb-product-media {
  margin-top: 0;
}

.kthb-pdp-demo-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.kthb-pdp-demo-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo-title__link {
  display: inline-block;
  margin-inline-start: 0.35em;
  padding: 0.1em 0.35em;
  font-size: 0.7em;
  font-weight: 600;
  line-height: 1;
  vertical-align: 0.15em;
  color: var(--kthb-text-secondary);
  text-decoration: none;
  border-radius: 4px;
  background: var(--kthb-surface-secondary, #f0f0f1);
  transition: background 0.15s ease, color 0.15s ease;
}

.kthb-pdp-demo-title__link:hover,
.kthb-pdp-demo-title__link:focus-visible {
  color: var(--kthb-text-primary);
  background: var(--katheeb-primary-color);
}

.kthb-dark-mode .kthb-pdp-demo-title__link {
  background: rgba(255, 255, 255, 0.08);
}

.kthb-dark-mode .kthb-pdp-demo-title__link:hover,
.kthb-dark-mode .kthb-pdp-demo-title__link:focus-visible {
  background: var(--katheeb-primary-color);
  color: #111;
}

.kthb-pdp-demo-pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.kthb-pdp-demo-pricing,
.kthb-pdp-demo-buy__value {
  .kthb-currency-sar {
    vertical-align: -0.05em;
  }
}

.kthb-pdp-demo-price-now {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo-pricing.is-on-sale .kthb-pdp-demo-price-now {
  color: #e11d48;
}

.kthb-pdp-demo-price-was {
  font-size: 1rem;
  color: var(--kthb-text-secondary);
  text-decoration: line-through;
}

.kthb-pdp-demo-tax {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--kthb-text-secondary);
}

.kthb-pdp-demo-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--kthb-tone-success-fg);
}

.kthb-pdp-demo-desc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo-desc p {
  margin: 0;
}

.kthb-pdp-demo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--kthb-border-color);
  border-bottom: 1px solid var(--kthb-border-color);
  font-size: 13px;
}

.kthb-pdp-demo-meta__label {
  color: var(--kthb-text-secondary);
}

.kthb-pdp-demo-meta__value {
  font-weight: 600;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo-buy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.kthb-pdp-demo-buy__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.kthb-pdp-demo-buy__label {
  color: var(--kthb-text-secondary);
}

.kthb-pdp-demo-buy__value {
  font-weight: 700;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo-qty {
  display: inline-flex;
  align-items: center;
  min-width: 140px;
  border: 1px solid var(--kthb-border-color);
  border-radius: 8px;
  overflow: hidden;
  background: var(--kthb-surface);
}

.kthb-pdp-demo-qty__btn,
.kthb-pdp-demo-qty__val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  font-size: 15px;
  font-weight: 600;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo-qty__val {
  flex: 1;
  border-inline: 1px solid var(--kthb-border-color);
}

.kthb-pdp-demo-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: default;
  opacity: 1;
}

.kthb-pdp-demo-cart:disabled {
  opacity: 1;
  color: #fff;
}

.kthb-dark-mode .kthb-pdp-demo-cart {
  background: #fff;
  color: #111;
}

.kthb-pdp-demo-payments {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.kthb-pdp-demo-payments::-webkit-scrollbar {
  display: none;
}

.kthb-pdp-demo-payments__icon {
  flex: 0 0 auto;
  display: block;
  width: 30px;
  height: auto;
  padding: 6px 8px;
  box-sizing: content-box;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}

/* Affiliate cross-sell / quantity-discount demos (PDP preview only) */
.kthb-pdp-demo .kthb-pdp-aff {
  margin: 20px 0;
}

.kthb-pdp-demo .kthb-pdp-aff-footer {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
}

.kthb-pdp-demo .kthb-pdp-aff-footer__link {
  color: var(--kthb-text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kthb-pdp-demo .kthb-pdp-aff-footer__link:hover {
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo .kthb-pdp-aff-cross__head {
  text-align: center;
  margin-bottom: 12px;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--kthb-text-primary);
  line-height: 1.35;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #c62828;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 8px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--kthb-border-color);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__card:hover {
  border-color: #111;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.kthb-dark-mode .kthb-pdp-demo .kthb-pdp-aff-cross__card {
  background: var(--kthb-surface);
}

.kthb-pdp-demo .kthb-pdp-aff-cross__img-wrap {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f3f3;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo .kthb-pdp-aff-cross__rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--kthb-text-secondary);
}

.kthb-pdp-demo .kthb-pdp-aff-cross__star {
  color: #f5a623;
  font-size: 12px;
  line-height: 1;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__reviews {
  opacity: 0.85;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__was {
  font-size: 11px;
  color: var(--kthb-text-secondary);
  text-decoration: line-through;
}

.kthb-pdp-demo .kthb-pdp-aff-cross__now {
  font-size: 13px;
  font-weight: 700;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo .kthb-pdp-aff-cross__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.kthb-dark-mode .kthb-pdp-demo .kthb-pdp-aff-cross__cta {
  background: #fff;
  color: #111;
}

.kthb-pdp-demo .kthb-pdp-aff-qty {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid #c5cdd8;
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kthb-dark-mode .kthb-pdp-demo .kthb-pdp-aff-qty__card {
  background: var(--kthb-surface);
  border-color: var(--kthb-border-color);
}

.kthb-pdp-demo .kthb-pdp-aff-qty__card:hover,
.kthb-pdp-demo .kthb-pdp-aff-qty__card.is-featured {
  border-color: #1e3a5f;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__card.is-featured {
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.08);
}

.kthb-pdp-demo .kthb-pdp-aff-qty__badge {
  position: absolute;
  inset-block-start: -1px;
  inset-inline-end: 16px;
  padding: 3px 10px 4px;
  border-radius: 0 0 8px 8px;
  background: #e85d04;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__visual {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f3f3;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__img--empty {
  display: block;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__label {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  line-height: 1.3;
}

.kthb-dark-mode .kthb-pdp-demo .kthb-pdp-aff-qty__label {
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo .kthb-pdp-aff-qty__sub {
  font-size: 11px;
  color: var(--kthb-text-secondary);
  line-height: 1.3;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 0 0 auto;
  text-align: end;
}

.kthb-pdp-demo .kthb-pdp-aff-qty__now {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a5f;
  line-height: 1.2;
}

.kthb-dark-mode .kthb-pdp-demo .kthb-pdp-aff-qty__now {
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo .kthb-pdp-aff-qty__was {
  font-size: 12px;
  color: var(--kthb-text-secondary);
  text-decoration: line-through;
}

@media (max-width: 720px) {
  .kthb-pdp-demo .kthb-pdp-aff-cross__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .kthb-pdp-demo .kthb-pdp-aff-cross__cta {
    font-size: 11px;
    min-height: 30px;
    padding: 5px 4px;
  }

  .kthb-pdp-demo .kthb-pdp-aff-qty__img {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .kthb-pdp-demo .kthb-pdp-aff-qty__now {
    font-size: 14px;
  }
}

/* Storefront-like product media strip inside the PDP demo */
.kthb-pdp-demo #kthb-product-media {
  margin: 16px 0 0;
  width: 100%;
  max-width: 100%;
}

.kthb-pdp-demo #kthb-product-media.is-feature-off {
  opacity: 0.35;
  pointer-events: none;
}

.kthb-pdp-demo #kthb-product-media .kthb-social-head-main {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--kthb-text-primary);
}

.kthb-pdp-demo #kthb-product-media .kthb-social-photos-wrapper {
  position: relative;
}

.kthb-pdp-demo #kthb-product-media .kthb-social-photos {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  max-width: 100%;
  padding: 0;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.kthb-pdp-demo #kthb-product-media .kthb-social-post {
  flex: 0 0 calc((100% - 36px) / 4);
  width: calc((100% - 36px) / 4);
  max-width: calc((100% - 36px) / 4);
  padding: 0;
  margin: 0;
}

/* Salla PDP preview: match storefront salla-slider (3.2 / 4, gaps 6 / 12) */
body.platform-salla .kthb-pdp-demo #kthb-product-media.kthb-is-scroller .kthb-social-photos {
  gap: 6px;
  scrollbar-width: none;
}

body.platform-salla .kthb-pdp-demo #kthb-product-media.kthb-is-scroller .kthb-social-photos::-webkit-scrollbar {
  display: none;
}

body.platform-salla .kthb-pdp-demo #kthb-product-media.kthb-is-scroller .kthb-social-post,
body.platform-salla .kthb-pdp-demo #kthb-product-media.kthb-is-scroller .kthb-pdp-demo-strip__item--placeholder {
  flex: 0 0 calc((100% - (2.2 * 6px)) / 3.2);
  width: calc((100% - (2.2 * 6px)) / 3.2);
  max-width: calc((100% - (2.2 * 6px)) / 3.2);
}

@media (min-width: 769px) {
  body.platform-salla .kthb-pdp-demo #kthb-product-media.kthb-is-scroller .kthb-social-photos {
    gap: 12px;
  }

  body.platform-salla .kthb-pdp-demo #kthb-product-media.kthb-is-scroller .kthb-social-post,
  body.platform-salla .kthb-pdp-demo #kthb-product-media.kthb-is-scroller .kthb-pdp-demo-strip__item--placeholder {
    flex: 0 0 calc((100% - (3 * 12px)) / 4);
    width: calc((100% - (3 * 12px)) / 4);
    max-width: calc((100% - (3 * 12px)) / 4);
  }
}

.kthb-pdp-demo #kthb-product-media .kthb-social-post-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.kthb-pdp-demo #kthb-product-media .kthb-social-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--kthb-pm-aspect-ratio, 3 / 4);
  object-fit: cover;
  background: var(--kthb-surface-secondary);
}

.kthb-pdp-demo #kthb-product-media.kthb-product-media-layout-circle .kthb-social-post,
.kthb-pdp-demo #kthb-product-media.kthb-product-media-layout-circle .kthb-social-post-link {
  overflow: hidden;
  border-radius: 50%;
}

.kthb-pdp-demo #kthb-product-media.kthb-product-media-layout-circle .kthb-social-media {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
}

.kthb-pdp-demo #kthb-product-media video.kthb-social-media {
  pointer-events: none;
}

.kthb-pdp-demo #kthb-product-media video.kthb-social-media::-webkit-media-controls {
  display: none !important;
}

.kthb-pdp-demo #kthb-product-media video.kthb-social-media::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.kthb-pdp-demo .kthb-pdp-demo-strip__item--placeholder {
  flex: 0 0 calc((100% - 36px) / 4);
  width: calc((100% - 36px) / 4);
  aspect-ratio: var(--kthb-pm-aspect-ratio, 3 / 4);
  border-radius: 12px;
  background: var(--kthb-surface-secondary);
}

@media only screen and (max-width: 768px) {
  .kthb-pdp-demo #kthb-product-media .kthb-social-photos {
    gap: 6px;
  }

  .kthb-pdp-demo #kthb-product-media .kthb-social-post,
  .kthb-pdp-demo .kthb-pdp-demo-strip__item--placeholder {
    flex: 0 0 calc((100% - 12px) / 3.2);
    width: calc((100% - 12px) / 3.2);
    max-width: calc((100% - 12px) / 3.2);
  }
}

/* Gallery inject (photos_grid*) */
.kthb-pdp-demo .kthb-gallery-video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.kthb-pdp-demo .kthb-gallery-video-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kthb-pdp-demo .kthb-gallery-video-el {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.kthb-pdp-demo .kthb-gallery-video.is-started .kthb-gallery-video-el {
  opacity: 1;
}

.kthb-pdp-demo .kthb-gallery-video.is-started .kthb-gallery-video-poster {
  visibility: hidden;
}

.kthb-pdp-demo .kthb-gallery-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border: 0;
  line-height: 1;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}

.kthb-pdp-demo .kthb-gallery-play svg,
.kthb-pdp-demo .kthb-gallery-play i {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 1;
  display: block;
  color: #fff;
}

.kthb-pdp-demo .kthb-gallery-video.is-playing .kthb-gallery-play {
  display: none;
}

.kthb-pdp-demo .kthb-gallery-mute {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  line-height: 1;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
}

.kthb-pdp-demo .kthb-gallery-video.is-playing .kthb-gallery-mute {
  display: flex;
}

.kthb-pdp-demo .kthb-gallery-mute svg,
.kthb-pdp-demo .kthb-gallery-mute i {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  display: block;
  color: #fff;
}

.kthb-pdp-demo .kthb-gallery-video-thumb {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.kthb-pdp-demo .kthb-gallery-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kthb-pdp-demo .kthb-gallery-video-thumb .kthb-gallery-play {
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.kthb-pdp-demo .kthb-gallery-video-thumb .kthb-gallery-play svg,
.kthb-pdp-demo .kthb-gallery-video-thumb .kthb-gallery-play i {
  width: 12px;
  height: 12px;
  font-size: 12px;
}

.kthb-pdp-demo-custom-badge {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed var(--kthb-border-color);
  background: var(--kthb-surface-secondary);
  font-size: 12px;
  color: var(--kthb-text-secondary);
}

.kthb-pdp-demo-custom-badge__sel {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--kthb-text-primary);
  word-break: break-all;
}

/* Media-only modal chrome (PDP strip / gallery click) */
/* Manage posts / PDP bulk-link: preview media without implying products are linked */
body.kthb-social-modal--hide-products #kthb-social-modal-products {
  display: none !important;
}

body.kthb-social-modal--media-only #kthb-social-modal-content {
  display: none !important;
}

body.kthb-social-modal--media-only #kthb-social-modal {
  width: auto !important;
  max-width: min(520px, calc(100vw - 24px)) !important;
  height: auto !important;
  max-height: min(96vh, calc(100dvh - 16px)) !important;
  background: #000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

body.kthb-social-modal--media-only #kthb-social-modal-media-column {
  flex: none !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
}

body.kthb-social-modal--media-only #kthb-social-modal-media-wrap {
  width: min(520px, calc(100vw - 24px)) !important;
  height: auto !important;
  max-height: min(94vh, calc(100dvh - 24px)) !important;
  aspect-ratio: 9 / 16 !important;
  background: #000 !important;
}

body.kthb-social-modal--media-only #kthb-social-modal-slides,
body.kthb-social-modal--media-only .kthb-social-modal-slide {
  width: 100% !important;
  height: 100% !important;
}

body.kthb-social-modal--media-only .kthb-social-modal-slide .kthb-social-media {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

@media (max-width: 768px) {
  body.kthb-social-modal--media-only #kthb-social-modal {
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    align-items: stretch !important;
  }

  body.kthb-social-modal--media-only #kthb-social-modal-media-column {
    flex: 1 1 auto !important;
    width: 100% !important;
  }

  body.kthb-social-modal--media-only #kthb-social-modal-media-wrap {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }
}

/* Landing Pages shortcode screen */
/* Prefer sibling selector over nested `tr + &` — that hide rule was not applying. */
tr[data-landing-id] ~ #kthb-no-landings{
  display: none;
}

.kthb-landing-modal-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;

  .katheeb-description{
    padding: 0;
    margin-bottom: 15px;
  }
}

@media only screen and (min-width: 769px) {
  .kthb-landing-modal-layout{
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .kthb-landing-modal-install{
    padding-inline-start: 20px;
    border-inline-start: 1px solid var(--kthb-border-color);
  }
}

.kthb-landing-modal-section-title{
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--kthb-text-primary);
}

.kthb-landing-modal-section-lead{
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--kthb-text-secondary, #666);
}

.kthb-landing-install-placeholder{
  margin: 0;
  padding: 14px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--kthb-text-secondary, #666);
  background: var(--kthb-surface-secondary);
  border: 1px dashed var(--kthb-input-border, #d0d0d0);
  border-radius: 8px;
}

#kthb-landing-install-ready[hidden],
#kthb-landing-install-placeholder[hidden]{
  display: none !important;
}

.kthb-landing-snippet-frame{
  overflow: hidden;
  border: 1px solid var(--kthb-input-border, #d0d0d0);
  border-radius: 10px;
  background: var(--kthb-surface-secondary);
}

.kthb-landing-snippet-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--kthb-border-color, #e6e6e6);
  background: color-mix(in srgb, var(--kthb-surface-secondary) 70%, var(--kthb-text-primary) 6%);
}

.kthb-landing-snippet-label{
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--kthb-text-secondary, #666);
}

.kthb-landing-snippet-action{
  font-size: 12px;
  font-weight: 500;
  color: var(--kthb-text-primary);
}

.kthb-landing-snippet-frame:has(.kthb-landing-install-snippet.is-copied) .kthb-landing-snippet-action{
  color: var(--kthb-tone-success-fg, #0a7a3e);
}

.kthb-landing-install-snippet{
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 108px;
  max-height: 180px;
  margin: 0;
  padding: 14px 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--kthb-text-primary);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  overflow: auto;
  transition: background-color 0.15s ease;
}

.kthb-landing-install-snippet:hover,
.kthb-landing-install-snippet:focus{
  background: color-mix(in srgb, var(--kthb-surface) 55%, transparent);
  outline: none;
}

.kthb-landing-install-snippet:focus-visible{
  box-shadow: inset 0 0 0 2px var(--kthb-focus-ring, #4c9aff);
}

.kthb-landing-install-snippet.is-copied{
  background: color-mix(in srgb, var(--kthb-tone-success-fg, #0a7a3e) 8%, transparent);
}

.kthb-landing-install-guide{
  margin-top: 14px;
}

.kthb-landing-install-guide-title{
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--kthb-text-primary);
}

.kthb-landing-install-steps{
  margin: 0;
  padding-inline-start: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--kthb-text-secondary, #666);
}

.kthb-landing-install-steps li + li{
  margin-top: 6px;
}

@media only screen and (max-width: 768px) {
  .kthb-landing-modal-install{
    padding-top: 14px;
    border-top: 1px solid var(--kthb-border-color);
    border-inline-start: 0;
    padding-inline-start: 0;
  }
}

.kthb-settings-modal-footer .kthb-button[aria-disabled="true"]{
  opacity: 0.45;
  pointer-events: none;
}

/* Landing Pages feature paywall (empty + ineligible) and compact lock banner. */
.kthb-landing-paywall{
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
  background: var(--kthb-surface);
  border: 1px solid var(--kthb-border-color);
  border-radius: 22px;
  padding: 40px 3%;
}

.kthb-landing-paywall__image{
	display: block;
	width: min(100%, 600px);
	height: auto;
}

.kthb-landing-paywall__title{
	margin: 20px 0 10px;
	font-size: 34px;
	line-height: 1.25;
}

.kthb-landing-paywall__lead{
	margin: 0 0 28px;
	max-width: 54ch;
	font-size: 15px;
	line-height: 1.55;
}

.kthb-landing-paywall__cards{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	width: 100%;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
	text-align: start;
}

.kthb-landing-paywall__card{
	padding: 20px;
	background: var(--kthb-surface-secondary);
	border: 1px solid var(--kthb-border-color);
	border-radius: 16px;
}

.kthb-landing-paywall__card-icon{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 55px;
	height: 55px;
	margin: 0 0 12px;
	border-radius: 16px;
	background: var(--kthb-surface);
	border: 1px solid var(--kthb-border-color);
}

.kthb-landing-paywall__card-icon svg{
	width: 25px;
	height: 25px;
	display: block;
}

.kthb-landing-paywall__card-title{
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
}

.kthb-landing-paywall__card-text{
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--kthb-text-secondary);
}

.kthb-landing-paywall__cta{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.kthb-landing-paywall__cta-note{
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--kthb-text-secondary);
}

.kthb-landing-paywall .kthb-button.kthb-landing-paywall__button--big{
	padding: 14px 36px;
	min-width: 240px;
	justify-content: center;
}

@media only screen and (max-width: 768px){
	.kthb-landing-paywall__cards{
		grid-template-columns: 1fr;
	}
}

#kthb-landing-pages-table .kthb-table{
	table-layout: fixed;
	width: 100%;

	.landing-name{
		width: 34%;
	}

	.landing-widgets{
		width: 34%;
	}

	.landing-status{
		width: 14%;
	}

	.post-edit{
		width: 18%;
		text-align: end;
	}
}

#kthb-landing-pages-table tr.is-loading .kthb-visibility-toggle{
	pointer-events: none;
	opacity: 0.7;
}

@media only screen and (max-width: 768px) {
	#kthb-landing-pages-table{
		.kthb-table-row-actions{
			flex-direction: column;
			align-items: stretch;
			gap: 6px;
		}

		.kthb-table{
			.landing-name{
				width: 30%;
			}

			.landing-widgets{
				width: 28%;
			}

			.landing-status{
				width: 16%;
			}

			.post-edit{
				width: 26%;
			}
		}
	}
}

/* Refresh button (AJAX): spinning icon while the job runs, status line under the control */
.kthb-social-refresh.kthb-loading svg{
  animation: kthb-button-spin 0.9s linear infinite;
}

.kthb-message[data-kthb-notice].kthb-social-refresh-status{
  margin-top: 12px;
  margin-bottom: 0;
}

.store-card .kthb-social-refresh-status{
  margin-bottom: 12px;
}

/* D18: Meta account mismatch choice (Use @new / Connect a different account) */
.kthb-meta-switch-form{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
