/**
 * Берекет Банк — ЛОВЗ Panel Styles
 */

/* --- Panel Sidebar --- */
.bb-lovz-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 999999;
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
}
.bb-lovz-panel.bb-lovz-open {
  right: 0;
}
.bb-lovz-panel * {
  font-family: inherit !important;
  box-sizing: border-box;
}

/* Overlay */
.bb-lovz-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 999998;
}

/* Inner */
.bb-lovz-inner {
  padding: 24px 20px 32px;
}

/* Header */
.bb-lovz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid #1B6B4A;
}
.bb-lovz-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
}
.bb-lovz-title svg {
  color: #1B6B4A;
  flex-shrink: 0;
}
.bb-lovz-close {
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 4px !important;
  color: #9CA3AF !important;
  min-height: auto !important;
  width: auto !important;
}
.bb-lovz-close:hover {
  color: #374151 !important;
}

/* Sections */
.bb-lovz-section {
  margin-bottom: 20px;
}
.bb-lovz-section h3 {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
}

/* Button rows */
.bb-lovz-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bb-lovz-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.bb-lovz-row-wrap {
  flex-wrap: wrap;
}

/* Buttons */
.bb-lovz-panel button[data-bb-act] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px !important;
  background: #fff !important;
  border: 1.5px solid #E5E7EB !important;
  border-radius: 10px !important;
  color: #374151 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3 !important;
  min-height: 42px !important;
  text-align: center;
  flex: 1;
  min-width: 0;
}
.bb-lovz-panel button[data-bb-act]:hover {
  background: #F0FDF4 !important;
  border-color: #1B6B4A !important;
}
.bb-lovz-panel button[data-bb-act].bb-active {
  background: #1B6B4A !important;
  border-color: #1B6B4A !important;
  color: #fff !important;
}
.bb-lovz-panel button[data-bb-act].bb-active svg {
  stroke: #fff;
}
.bb-lovz-panel button[data-bb-act] svg {
  flex-shrink: 0;
  stroke: #374151;
}

/* Reset button */
.bb-lovz-reset {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 24px;
  padding: 14px !important;
  background: #DC2626 !important;
  border: none !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bb-lovz-reset:hover {
  background: #B91C1C !important;
}
.bb-lovz-reset svg {
  stroke: #fff;
}

/* Ruler */
.bb-lovz-ruler {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #DC2626;
  z-index: 999997;
  pointer-events: none;
  display: none;
  box-shadow: 0 0 0 1px rgba(220,38,38,0.2);
}

/* --- Color Schemes (applied to body) --- */
body[data-bb-vision="blackOnWhite"],
body[data-bb-vision="blackOnWhite"] * {
  background-color: #fff !important;
  color: #000 !important;
}
body[data-bb-vision="whiteOnBlack"],
body[data-bb-vision="whiteOnBlack"] * {
  background-color: #000 !important;
  color: #fff !important;
}
body[data-bb-vision="darkBlueOnBlue"],
body[data-bb-vision="darkBlueOnBlue"] * {
  background-color: #9DD1FF !important;
  color: #063462 !important;
}
body[data-bb-vision="brownOnBeige"],
body[data-bb-vision="brownOnBeige"] * {
  background-color: #F7F3D6 !important;
  color: #4D4B43 !important;
}

/* Protect panel from color scheme overrides */
body[data-bb-vision] .bb-lovz-panel,
body[data-bb-vision] .bb-lovz-panel * {
  background-color: revert !important;
  color: revert !important;
}
body[data-bb-vision] .bb-lovz-panel {
  background-color: #fff !important;
}
body[data-bb-vision] .bb-lovz-panel .bb-lovz-title {
  color: #1a1a2e !important;
}
body[data-bb-vision] .bb-lovz-panel h3 {
  color: #374151 !important;
}
body[data-bb-vision] .bb-lovz-panel button[data-bb-act] {
  background: #fff !important;
  color: #374151 !important;
  border-color: #E5E7EB !important;
}
body[data-bb-vision] .bb-lovz-panel button[data-bb-act].bb-active {
  background: #1B6B4A !important;
  color: #fff !important;
  border-color: #1B6B4A !important;
}
body[data-bb-vision] .bb-lovz-panel .bb-lovz-reset {
  background: #DC2626 !important;
  color: #fff !important;
}

/* --- Font Family (applied to body) --- */
body[data-bb-font="arial"],
body[data-bb-font="arial"] * {
  font-family: Arial, Helvetica, sans-serif !important;
}
body[data-bb-font="times"],
body[data-bb-font="times"] * {
  font-family: 'Times New Roman', Times, serif !important;
}
/* Protect panel font */
body[data-bb-font] .bb-lovz-panel,
body[data-bb-font] .bb-lovz-panel * {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

/* --- Mobile --- */
@media (max-width: 480px) {
  .bb-lovz-panel {
    width: 100vw;
    right: -100vw;
  }
  .bb-lovz-inner {
    padding: 20px 16px 28px;
  }
  .bb-lovz-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Body lock */
body.bb-vision-lock {
  overflow: hidden;
}
