/* === PP Rotating Promo (moBox) — Legacy look for WordPress ===
   Folder layout (recommended):
   /wp-content/themes/pp/assets/widgets/rotating-mo-box/
     ├─ mo-box.css
     └─ img/
        ├─ PPSG-SB-Form.jpg
        ├─ PPSG-SB-Cover.jpg
        ├─ PPSG-SB-Comp-Plan1.png
        ├─ PPSG-SB-Comp-Plan2.png
        ├─ PPSG-SB-Comp-Now1.png
        └─ PPSG-SB-Comp-Now2.png
*/

/* Main container: fixed legacy size to match cover slide distance (320px) */
.mo-box-main {
  color: #eee;
  position: relative;
  overflow: hidden;
  display: block;
}

/* Sliding cover layer — JS animates margin-left between 0 and -320px */
.mo-box-cover {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  color: #fff;
  background: #000 url('widgets/img/PPSG-SB-Cover.jpg') no-repeat center/cover;
  /* NOTE: If the widget provides an inline style with background-image, that will override this */
}

/* Optional: component header (legacy template used text on top of the form area) */
.mo-box-form-header {
  padding: 22px 20px;
  font-size: 22px;
  text-align: center;
  letter-spacing: 0.25px;
}
.mo-box-form-header span {
  font-weight: 700;
  color: #fff;
}

/* Decorative divider line */
.mo-box-line {
  position: absolute;
  top: 60px;
  left: 0;
  height: 3px;
  width: 320px;
  background-color: #f79b38;
}

/* Form block container (the area revealed after cover slides) */
.mo-box-form {
  position: relative; /* keep content stacking context */
  z-index: 1;         /* under .mo-box-cover */
  padding: 75px 0 0;  /* space from top to align with legacy visuals */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Generic label */
.mo-box-label {
  font-size: 12px;
  padding: 0 0 8px;
  color: #fff;
}

/* Row container (fixed legacy width) */
.mo-box-row {
  width: 220px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  display: block; /* fix from "display: relative" */
  clear: both;
}

/* Two-column helper (left/right) — used by inputs/selects */
.mo-box-col-left {
  width: 60px;
  float: left;
}
.mo-box-col-right {
  width: 120px;
  float: right;
}

/* Text input field with framed style */
.mo-box-input {
  width: 220px;
  height: 38px;
  display: inline-block;
  border-radius: 10px;
  border: 2px #fff solid;
  position: relative;
  box-sizing: border-box;
}
.mo-box-input input {
  color: #fff;
  font-size: 12px;
  margin: 0 20px;
  background-color: transparent !important;
  vertical-align: middle;
  height: 37px;
  width: calc(100% - 40px);
  border: 0 !important;
  outline: 0;
}
.mo-box-input input::-ms-clear { display: none; }

/* Dropdown (full width) */
.mo-box-dropdown {
  width: 220px;
  margin-bottom: 15px;
  display: inline-block;
  border-radius: 10px;
  border: 2px #fff solid;
  position: relative;
  box-sizing: border-box;
}
.mo-box-dropdown select,
.mo-box-dropdown option { color: #fff; } /* option text while closed */
.mo-box-dropdown select,
.mo-box-dropdown::after {
  display: block;
  background: #78ba00;
}
.mo-box-dropdown select,
.mo-box-dropdown option {
  padding: 4px;
  font-size: 12px;
}
.mo-box-dropdown::after {
  content: "\25bc";
  position: absolute;
  top: 1px;
  right: 14px;
  width: 32px;
  font-size: 14px;
  line-height: 34px;
  text-align: center;
  background-color: transparent;
  pointer-events: none;
}
.mo-box-dropdown select {
  margin-left: 20px;
  padding-right: 20px;
  background-color: transparent;
  vertical-align: middle;
  height: 37px;
  width: 180px;
  border: 0;
  outline: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
/* When the native dropdown opens, options list uses light theme for readability */
.mo-box-dropdown option {
  background: #fff;
  color: #333;
}
.mo-box-dropdown select::-ms-expand { display: none; }

/* Half-width variant (2 columns) */
.mo-box-drophalf { width: 120px; }
.mo-box-drophalf select { width: 80px; }

/* Submit / CTA buttons (sprite-like hover) */
.mo-box-but-comp-plan,
.mo-box-but-submit {
  width: 223px;
  height: 48px;
  cursor: pointer;
  background-repeat: no-repeat;
  font-size: 0;
  border: none;
  background-color: transparent;
  display: inline-block;
}
.mo-box-but-comp-plan { background-image: url('img/PPSG-SB-Comp-Plan1.png'); }
.mo-box-but-comp-plan:hover { background-image: url('img/PPSG-SB-Comp-Plan2.png'); }

.mo-box-but-submit { background-image: url('img/PPSG-SB-Comp-Now1.png'); }
.mo-box-but-submit:hover { background-image: url('img/PPSG-SB-Comp-Now2.png'); }

/* Placeholder for PPQuote (until shortcode is ready) */
.ppquote-placeholder {
  padding: 12px;
  border: 1px dashed #cbd5e0;
  border-radius: 6px;
  background: #f7fafc;
  color: #2d3748;
  font-size: 14px;
}

/* Small safety for extremely narrow sidebars */
@media (max-width: 360px) {
  .mo-box-main { transform: scale(.95); transform-origin: top left; }
}
