/* Teach-This eBook Promo Box (TTEB) - isolated namespace
   File: /templates/shaper_newedge/css/tteb_promo.css
*/

.tteb-promo { /* placeholder */ }

/* Card */
.tteb-promo .tteb-card{
  width: 100%;
  max-width: 1140px;
  margin: 30px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  padding: 26px;
  box-sizing: border-box;

  display: grid !important;
  grid-template-columns: 255px minmax(0, 1fr) !important;
  column-gap: 28px;
  align-items: start;

  text-align: left;
  justify-items: start;
}

/* Left: cover */
.tteb-promo .tteb-media{
  grid-column: 1;
  grid-row: 1;

  display: flex !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  width: 100%;
}

.tteb-promo .tteb-cover{
  width: 225px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 !important;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

/* Right side */
.tteb-promo .tteb-body{
  grid-column: 2;
  grid-row: 1;

  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  padding-top: 0;
}

/* Meta grid */
.tteb-promo .tteb-meta{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 54px;
  margin: 0;
}

.tteb-promo .tteb-metaItem{
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 6px;
  line-height: 1.45;
  align-items: start;
}

.tteb-promo .tteb-label{
  color:#666;
  font-weight:600;
  white-space: nowrap;
}

.tteb-promo .tteb-label::after{ content: ":"; }

.tteb-promo .tteb-value{
  color:#0b5d7a;
  font-weight:700;
  word-break: break-word;
}

/* Price pill */
.tteb-promo .tteb-priceRow{
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #f5f6f8;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0;
  width: fit-content;
}

.tteb-promo .tteb-price{
  font-size: 26px;
  font-weight: 800;
  color: #333;
  line-height: 1;
}

.tteb-promo .tteb-price .tteb-cents{
  font-size: 14px;
  vertical-align: top;
  position: relative;
  top: 4px;
}

.tteb-promo .tteb-per{
  color:#38b000;
  font-weight:700;
  font-size: 14px;
  line-height: 1.2;
}

/* Buttons */
.tteb-promo .tteb-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
  width: 100%;
}

.tteb-promo .tteb-btn{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none !important;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-sizing: border-box;
  min-height: 52px;
  width: 100%;
}

.tteb-promo .tteb-btnPrimary{
  background: #27b0d9;
  color: #fff !important;
}

.tteb-promo .tteb-btnPrimary:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(39,176,217,.25);
  background: #1d9abf;
}

.tteb-promo .tteb-btnSecondary{
  background: #aee6ff;
  color:#165b73 !important;
  border-color: #86d8ff;
}

.tteb-promo .tteb-btnSecondary:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* Focus */
.tteb-promo .tteb-btn:focus,
.tteb-promo .tteb-btn:focus-visible{
  outline: 3px solid #0078aa;
  outline-offset: 2px;
}

/* Tablet / narrower desktop */
@media (max-width: 986px){
  .tteb-promo .tteb-body{ gap: 12px; }
  .tteb-promo .tteb-meta{ gap: 12px 24px; }

  .tteb-promo .tteb-card{
    grid-template-columns: 255px minmax(0, 1fr) !important;
    column-gap: 22px;
  }
}

/* Never allow the price to wrap */
.tteb-promo .tteb-price{
  white-space: nowrap;
}

.tteb-promo .tteb-price .tteb-cents{
  display: inline-block; /* keeps .99 attached */
}

/* Fix mid-width squish (around 700px) */
@media (max-width: 700px){
  .tteb-promo .tteb-priceRow{
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto 1fr; /* price stays wide, green text uses remaining space */
    align-items: center;
    column-gap: 12px;
  }

  .tteb-promo .tteb-per{
    font-size: 13px;  /* slightly smaller so it fits better */
    line-height: 1.2;
  }
}

/* Mobile */
@media (max-width: 640px){
  .tteb-promo .tteb-card{
    grid-template-columns: 1fr !important;
    padding: 20px;
    row-gap: 18px;

    /* Center everything when stacked */
    justify-items: center;
    text-align: center;
  }

  .tteb-promo .tteb-media{
    justify-content: center !important;
  }

  .tteb-promo .tteb-body{
    grid-column: 1;
    grid-row: 2;
    gap: 18px;
    width: 100%;
  }

  /* Keep meta as one column, but make each item label+value on one line */
  .tteb-promo .tteb-meta{
    grid-template-columns: 1fr;
    gap: 14px 0;
    justify-items: center;
  }

  .tteb-promo .tteb-metaItem{
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    row-gap: 0; /* ignore old grid row-gap */
  }

  /* Price row: match button width */
  .tteb-promo .tteb-priceRow{
    width: 100%;
    max-width: 520px;   /* match buttons */
    margin-left: auto;
    margin-right: auto;

    display: flex;      /* override any 700px rule that may set grid/100% */
    justify-content: center;
    flex-wrap: wrap;    /* allows green text to wrap if needed */
    text-align: center;
  }

  /* Prevent $17.99 from splitting */
  .tteb-promo .tteb-price{
    white-space: nowrap;
  }

  .tteb-promo .tteb-actions{
    grid-template-columns: 1fr;
    max-width: 520px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .tteb-promo .tteb-cover{
    width: 225px;
    max-width: 100%;
  }
}