/* ==================== Section Info & Modal ==================== */

/* Info snippet below section title, above products */
.mlbb-section-info {
  margin-top: 12px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

/* Hide info section if text is empty */
.mlbb-section-info:has(.info-snippet-text:empty) {
  display: none;
}

.info-snippet {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 12px;
  padding: 14px;
  position: relative;
}

.info-snippet p {
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.read-more-btn {
  background: linear-gradient(90deg, var(--mlbb-primary), var(--mlbb-primary-dark));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.read-more-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Modal overlay */
.info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.info-modal-overlay.active {
  display: block;
  opacity: 1;
}

/* Modal container */
.info-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 60%;
  background: var(--mlbb-surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.info-modal-overlay.active .info-modal {
  transform: translateY(0);
}

/* Modal header */
.info-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mlbb-border);
  flex-shrink: 0;
}

.info-modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.info-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.info-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Modal body */
.info-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  color: #e2e8f0;
  line-height: 1.6;
}

.info-modal-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4dabf7;
  margin: 16px 0 10px 0;
}

.info-modal-body h3:first-child {
  margin-top: 0;
}

.info-modal-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #74c0fc;
  margin: 12px 0 8px 0;
}

.info-modal-body p {
  margin: 8px 0;
  font-size: 0.95rem;
}

.info-modal-body ul,
.info-modal-body ol {
  margin: 8px 0;
  padding-left: 20px;
}

.info-modal-body li {
  margin: 6px 0;
  font-size: 0.95rem;
}

.info-modal-body strong {
  color: #fff;
  font-weight: 600;
}

.info-modal-body .highlight {
  background: rgba(37, 99, 235, 0.2);
  border-left: 3px solid var(--mlbb-primary);
  padding: 10px 12px;
  margin: 12px 0;
  border-radius: 4px;
  font-weight: 500;
}

/* Scrollbar styling for modal */
.info-modal-body::-webkit-scrollbar {
  width: 6px;
}

.info-modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.info-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.info-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop responsive */
@media (min-width: 700px) {
  .info-modal {
    max-height: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    max-width: 720px;
    border-radius: 20px 20px 0 0;
  }

  .info-modal-overlay.active .info-modal {
    transform: translateX(-50%) translateY(0);
  }
}

@media (min-width: 1025px) {
  .info-modal {
    max-width: 900px;
  }
}