/* Custom css for 3D Viewer */

.b3dviewer_front_shortcode input {
  cursor: pointer;
  text-align: center;
  border: none;
  outline: none;
  background-color: #1e8cbe;
  color: #fff;
  padding: 4px 10px;
  border-radius: 3px;
}

.b3dviewer_front_shortcode {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* margin: 0 auto;
  width: 100%; */
}

.b3dviewer_front_shortcode svg {
  cursor: pointer;
}

.b3dviewer_front_shortcode .htooltip {
  visibility: hidden;
  width: 140px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 150%;
  left: 50%;
  margin-left: -75px;
  opacity: 0;
  transition: opacity 0.3s;
}

.b3dviewer_front_shortcode .htooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.b3dviewer_front_shortcode:hover .htooltip {
  visibility: visible;
  opacity: 1;
}

.bp3d_shortcode {
  margin-top: 30px;
  border: 5px solid #4527a4;
  overflow: hidden;
}

.bp3d_shortcode .shortcode-heading {
  background: #4527a4;
  padding: 15px;
  overflow: hidden;
  color: #ffffff;
}

.bp3d_shortcode .shortcode-heading .icon {
  float: left;
  overflow: hidden;
  width: 50%;
}

.bp3d_shortcode .shortcode-heading .text {
  float: right;
  overflow: hidden;
  text-align: right;
}

.bp3d_shortcode .shortcode-heading .text a {
  color: #ffffff;
  display: block;
  text-decoration: none;
}

.bp3d_shortcode .shortcode-left {
  width: 50%;
  float: left;
  overflow: hidden;
  padding: 20px 0 30px;
  text-align: center;
  background: #ffffff;
  border-right: 5px solid #4527a4;
  box-sizing: border-box;
}

.bp3d_shortcode .shortcode-right {
  width: 50%;
  float: left;
  overflow: hidden;
  padding: 20px 0 30px;
  text-align: center;
  background: #ffffff;
}

.bp3d_shortcode .shortcode {
  padding: 8px 15px;
  background: #eae6f9;
  display: inline-block;
  user-select: all;
  font-size: 16px;
}

/* Woocommerce Css */
/* #woocommerce-product-images {
  display: none;
} */

.meta-box-sortables #shortcode_area {
  margin-top: 70px;
}

.meta-box-sortables .bp3d-down-arrow::after {
  content: "➜";
  position: absolute;
  top: -115px;
  left: 42%;
  rotate: 90deg;
  font-size: 40px;
  animation: jumpInfinite 2s infinite;
}


@keyframes jumpInfinite {
  0% {
    margin-top: 0
  }

  50% {
    margin-top: 20px
  }

  to {
    margin-top: 0
  }
}

.bp3d_front_shortcode_area {
  label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
  }

  .button {
    margin-top: 12px;
    width: 100%;
    border-radius: 3px;
    background: #146ef5;
  }
}

.bp3d_upgrade_notice {
  border: 1px solid #ccc;
  background: linear-gradient(#fefefe, #f5f5f5);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  margin-top: 15px;
  margin-right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bp3d_upgrade_notice .flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bp3d_upgrade_notice a.button {
  background: #146ef5;
  border: none;
  padding: 4px 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 13px;
}

.bp3d_upgrade_notice a.button:hover,
.bp3d_upgrade_notice a.button:focus,
.bp3d_upgrade_notice a.button:active {
  background: #0957ca;
  border: none;
  box-shadow: none;
}

.bp3d-metabox-upgrade-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.csf-theme-light .csf-nav-normal>ul li a {
  font-size: 15px;
}

.button.button-bplugins {
  background: #146ef5;
  color: #fff;
}

.components-button.button.button-bplugins:hover,
.button.button-bplugins:hover {
  background: #0957ca;
  color: #fff;
}

.bp3d_shortcode_area_after_title {
  display: flex;
  background: #fff;
  padding: 5px 15px;
  align-items: center;
  /* justify-content: center; */
  gap: 15px;
  border-radius: 3px;
  margin-top: 10px;
  border: 1px solid #ccc;

  label {
    font-weight: 500;
    font-size: 1rem;
  }

  .shortcode_area {
    display: flex;
    align-items: center;
    gap: 10px;

    svg {
      cursor: pointer;
    }
  }
}

.csf-metabox .ui-icon,
.csf-metabox .ui-state-hover .ui-icon {
  background-image: none !important
}

/* codestar pro card */
/* Pro Notice Box Styles */
.bp3d-pro-notice-box {
  background: linear-gradient(135deg, #f9fbff 0%, #f0f5ff 100%);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e0e7ff;
  box-shadow: 0 4px 15px rgba(35, 119, 242, 0.05);
  position: relative;
  overflow: hidden;
}

.bp3d-pro-notice-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #2377f2;
}

.bp3d-pro-notice-title {
  margin-top: 0 !important;
  color: #1a56b1 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bp3d-pro-notice-desc {
  font-size: 14px;
  color: #2377f2;
  margin-bottom: 15px;
  font-weight: 500;
}

.bp3d-pro-notice-list {
  margin: 15px 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
}

.bp3d-pro-notice-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  color: #1a56b1;
  font-size: 13.5px;
}

.bp3d-pro-notice-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #2377f2;
  font-weight: bold;
}

.bp3d-pro-notice-list li strong {
  color: #0d2c5a;
}

.bp3d-pro-notice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2377f2;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(35, 119, 242, 0.2);
  border: none;
  cursor: pointer;
}

.bp3d-pro-notice-button:hover {
  background: #1a56b1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(35, 119, 242, 0.3);
  color: #fff !important;
}
/* ========================================
   Live model preview (metabox) — redesign
   ======================================== */

/* Live preview container styling inside CSF field */
#bp3d-model-preview-root {
  width: 100%;
}

/* --- Preview panel card --- */
.bp3d-model-preview {
  position: relative;
  border-radius: 0px !important;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.bp3d-model-preview:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* When inside CSF metabox without layout wrapper, keep legacy sticky behavior */
.csf-metabox > .bp3d-model-preview {
  margin: 0 0 16px;
}

/* --- Header bar --- */
.bp3d-model-preview__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.bp3d-model-preview__header:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e8ecff 100%);
}

.bp3d-model-preview__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 0px !important;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  flex-shrink: 0;
}

.bp3d-model-preview__icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.bp3d-model-preview__title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: 0.01em;
}

.bp3d-model-preview__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 0px !important;
  background: #dcfce7;
  color: #16a34a;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bp3d-model-preview__badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #16a34a;
  animation: bp3d-pulse 2s ease-in-out infinite;
}

/* --- Header action buttons --- */
.bp3d-model-preview__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bp3d-model-preview__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.bp3d-model-preview__btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.bp3d-model-preview__btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.bp3d-model-preview__btn--refresh svg {
  transition: transform 0.3s ease;
}

.bp3d-model-preview__btn--refresh:hover svg {
  transform: rotate(90deg);
}

.bp3d-model-preview__btn--toggle svg {
  transition: transform 0.25s ease;
}

.bp3d-model-preview--collapsed .bp3d-model-preview__btn--toggle svg {
  transform: rotate(-90deg);
}

/* --- Stage (preview viewport) --- */
.bp3d-model-preview__body {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  max-height: 800px;
  opacity: 1;
}

.bp3d-model-preview--collapsed .bp3d-model-preview__body {
  max-height: 0;
  opacity: 0;
}

.bp3d-model-preview__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 12px;
  margin: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 0px !important;
  background: #f9fafb;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.bp3d-model-preview__stage:hover {
  border-color: #c7d2fe;
}

.bp3d-model-preview__stage .modelViewerBlock,
.bp3d-model-preview__stage .b3dviewer-wrapper {
  width: 100%;
}

/* --- Empty state --- */
.bp3d-model-preview__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px 20px;
  margin: 0;
  text-align: center;
}

.bp3d-model-preview__empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 0px !important;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  animation: bp3d-float 3s ease-in-out infinite;
}

.bp3d-model-preview__empty-icon svg {
  width: 28px;
  height: 28px;
  fill: #818cf8;
}

.bp3d-model-preview__empty-text {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  max-width: 260px;
}

.bp3d-model-preview__empty-text strong {
  color: #64748b;
  font-weight: 600;
}

/* --- Animations --- */
@keyframes bp3d-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes bp3d-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --- Preview Popup Modal Redesign --- */
.bp3d-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  animation: bp3d-fade-in 0.25s ease-out;
}

.bp3d-modal-container {
  width: 90%;
  max-width: 850px;
  background: #ffffff;
  border-radius: 0px !important;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: bp3d-scale-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.bp3d-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.bp3d-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
}

.bp3d-modal-close {
  background: transparent;
  border: none;
  font-size: 28px;
  font-weight: 300;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s ease;
}

.bp3d-modal-close:hover {
  color: #ef4444;
}

.bp3d-modal-body {
  padding: 20px;
  background: #ffffff;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Let the viewer fill the modal stage, the same way it does in the sidebar
   preview box — without this the block keeps its intrinsic width and sits in
   the left half of the body. */
.bp3d-modal-body .modelViewerBlock,
.bp3d-modal-body .b3dviewer-wrapper {
  width: 100%;
}

/* Loading indicator. It is slotted into <model-viewer slot="progress-bar">, so
   its containing block is model-viewer's own slot wrapper (and, before the
   custom element upgrades, the wrapper itself). Centre it against whichever of
   those it lands in rather than relying on a percentage height that collapses
   to the icon, which pins it to the top-left corner. */
.bp3d-modal-body .bp3d_loader,
.bp3d-model-preview__stage .bp3d_loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal animation keyframes */
@keyframes bp3d-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bp3d-scale-up {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Remove radius from Shortcode row & preview trigger button --- */
.bp3d_shortcode_area_after_title,
.bp3d_shortcode_area_after_title * {
  border-radius: 0px !important;
}

.bp3d-preview-popup-trigger {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  border-color: #146ef5 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  background: #146ef5 !important;
  border-radius: 0px !important;
  height: 32px !important;
  line-height: 30px !important;
  transition: all 0.2s ease !important;
}

.bp3d-preview-popup-trigger:hover,
.bp3d-preview-popup-trigger:focus,
.bp3d-preview-popup-trigger:active {
  background: #0957ca !important;
  color: #ffffff !important;
  border-color: #0957ca !important;
  box-shadow: none !important;
}

.bp3d-preview-popup-trigger .dashicons {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
  display: flex !important;
  align-items: center !important;
  color: #ffffff !important;
}

.bp3d-preview-popup-trigger .dashicons::before {
  color: #ffffff !important;
}

/* --- Live Preview meta box (sidebar, directly under the Publish box) --- */
/* Hide the meta box title so the box reads as a clean button card — the
   button itself is labelled "Live Preview", so a title would be redundant. */
#bp3d_live_preview .postbox-header {
  display: none;
}

#bp3d_live_preview .inside {
  margin-top: 0;
  padding: 12px;
}

#bp3d-preview-btn-root {
  width: 100%;
}

.bp3d-preview-popup-trigger {
  width: 100% !important;
  justify-content: center !important;
  height: 40px !important;
  line-height: 38px !important;
  padding: 0 18px !important;
}

/* Pinned state: the entire meta box is fixed to the top of the viewport (its
   top/left/width are applied inline via JS from the measured column) once it
   scrolls out of view. A same-size placeholder holds its slot in the sidebar.
   z-index keeps it below the preview modal overlay (999999) so it hides itself
   while the modal is open. */
#bp3d_live_preview.is-stuck {
  z-index: 99990;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
