/* Container */
.my-ad-container,
.my-ad-container-horizontal {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  min-height: 250px;
}

.ad-content { padding: 15px; }

/* Vertical band — RIGHT side */
.ad-label-vertical {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: #1b6698;
  color: #fff;
  text-align: center;
  font: 12px/1 Arial, sans-serif;
  letter-spacing: 1px;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  padding-right: 7px;
  writing-mode: vertical-rl; /* vertical text without rotate */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Vertical band — LEFT side */
.ad-label-vertical-left {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 28px;
  background: #1b6698;
  color: #fff;
  font: 12px/1 Arial, sans-serif;
  letter-spacing: 1px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

/* If you prefer rotate instead of writing-mode, use this on the text element */
.ad-label-vertical span.rotate-270,
.ad-label-vertical-left span.rotate-270 {
  transform: rotate(270deg);
  font-size: 24px;
  font-weight: bold;
  color: #10b981;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Horizontal band — TOP */
.ad-label-horizontal {
  position: relative;
  height: 28px; /* adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b6698;
  color: #fff;
  font: 12px/1 Arial, sans-serif;
  letter-spacing: 1px;
  margin: -1rem -1rem 1rem; /* cancels grid-box padding on top/left/right */
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

/* Keep content clear of vertical bands when present */
.has-vert-right .ad-content { margin-right: 36px; }
.has-vert-left  .ad-content { margin-left: 36px; }


/* Borders block */
.addborder {
  background: #f1f5f9;
  border-left: 8px solid #2563eb;
  padding: 0.4em 0.9em 0.4em 1.3em;
  margin-bottom: 0.5em;
  border-radius: 0.33em;
  color: #0f172a;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .ad-label-vertical,
  .ad-label-vertical-left {
    position: static;
    width: auto;
    height: auto;
    writing-mode: horizontal-tb; /* revert to normal text flow */
    transform: none;
    text-align: center;
    padding: 4px 6px;
    border-radius: 8px;
  }
  .has-vert-right .ad-content,
  .has-vert-left  .ad-content {
    margin: 0;
  }
}

@media (min-width: 601px) {
  .ad-label-vertical {
    border-top-left-radius: 0;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 8px;
  }
}
