/* ============================================
   BP SHARE — container & variants
   ============================================ */
.bp-share-container {
  position: relative;
}

.bp-share-container--floating {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 3;
}

.bp-share-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #2563eb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bp-share-trigger-btn:hover,
.bp-share-trigger-btn:focus {
  color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.bp-share-container--compact .bp-share-trigger-btn,
.bp-share-container--floating .bp-share-trigger-btn {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
}

.bp-share-container--compact .bp-share-label,
.bp-share-container--compact .bp-share-grid,
.bp-share-container--floating .bp-share-label,
.bp-share-container--floating .bp-share-grid,
.bp-share-container--mini .bp-share-label {
  display: none;
}

.bp-share-container--mini .bp-share-grid .bp-share-btn__label {
  display: none;
}

.bp-share-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.bp-share-label__text {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.95rem;
}

.bp-share-label__text i {
  color: #2563eb;
  margin-right: 0.25rem;
}

.bp-share-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.bp-share-grid--modal {
  margin-bottom: 1rem;
}

.bp-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 2.75rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.bp-share-btn:hover,
.bp-share-btn:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.bp-share-btn i {
  font-size: 1rem;
}

.bp-share-btn--whatsapp { background: linear-gradient(135deg, #128c7e, #25d366); }
.bp-share-btn--facebook { background: linear-gradient(135deg, #0d47a1, #1877f2); }
.bp-share-btn--twitter { background: linear-gradient(135deg, #0f1419, #1d9bf0); }
.bp-share-btn--linkedin { background: linear-gradient(135deg, #004182, #0a66c2); }
.bp-share-btn--telegram { background: linear-gradient(135deg, #0088cc, #29b6f6); }
.bp-share-btn--email,
.bp-share-btn--copy,
.bp-share-btn--native { background: linear-gradient(135deg, #334155, #64748b); }

.bp-share-status {
  min-height: 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

.bp-share-status--success {
  color: #16a34a;
}

.bp-share-status--error {
  color: #dc2626;
}

/* ============================================
   Modal
   ============================================ */
.bp-share-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.bp-share-modal-overlay.bp-share-modal--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bp-share-modal {
  width: min(100%, 520px);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.bp-share-modal-overlay.bp-share-modal-overlay.bp-share-modal--open .bp-share-modal {
  transform: translateY(0) scale(1);
}

.bp-share-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 0.5rem;
}

.bp-share-modal__header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.bp-share-modal__close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
}

.bp-share-modal__body {
  padding: 0 1.25rem 1rem;
}

.bp-share-modal__description {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.bp-share-preview {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem;
  margin-bottom: 1rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.bp-share-preview__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  flex-shrink: 0;
}

.bp-share-preview__content h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: #0f172a;
}

.bp-share-preview__content p {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
}

.bp-share-url-wrapper {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.bp-share-url-input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  color: #334155;
  background: #fff;
}

.bp-share-url-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 0.65rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.bp-share-modal__footer {
  padding: 0.75rem 1.25rem 1.25rem;
  text-align: right;
}

/* ============================================
   Toast
   ============================================ */
body.bp-share-modal-open .bp-featured-card:hover,
body.bp-share-modal-open .bp-quiz-item__card:hover,
body.bp-share-modal-open .bp-quiz-card:hover {
  transform: none;
}

body.bp-share-modal-open .bp-share-trigger-btn:hover {
  transform: none;
}

.bp-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 240px;
  max-width: 360px;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bp-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.bp-toast--error {
  background: #7f1d1d;
}

.bp-toast__icon {
  font-size: 1.1rem;
  color: #4ade80;
}

.bp-toast--error .bp-toast__icon {
  color: #fca5a5;
}

.bp-toast__content {
  flex: 1;
  font-size: 0.88rem;
}

.bp-toast__close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

/* ============================================
   Share landing page
   ============================================ */
.bp-share-landing {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 45%);
}

.bp-share-landing__media {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.bp-share-landing__thumb,
.bp-share-landing__auto-thumb {
  width: 100%;
  display: block;
  min-height: 280px;
  object-fit: cover;
}

.bp-share-landing__breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  color: #64748b;
  font-size: 0.9rem;
}

.bp-share-landing__breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.bp-share-landing__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.bp-share-landing__title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
}

.bp-share-landing__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bp-share-landing__desc {
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.bp-share-landing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.bp-quiz-card {
  position: relative;
}

.bp-quiz-card__share,
.bp-featured-card__share,
.bp-quiz-item__share {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
}

.bp-quiz-card__share .bp-share-container--floating,
.bp-featured-card__share .bp-share-container--floating,
.bp-quiz-item__share .bp-share-container--floating {
  position: static;
}

.bp-quiz-card--public .bp-quiz-card__share {
  position: static;
  top: auto;
  right: auto;
  inset-inline-end: auto;
}

.bp-quiz-auto-thumb--hero:not(.bp-hero-thumbnail__auto),
.bp-share-landing__auto-thumb {
  min-height: 320px;
}

.quiz-catalog-card .bp-share-container {
  margin-top: 0.5rem;
}

.bp-quiz-item__actions-secondary .bp-share-trigger-btn {
  border-radius: 0.5rem;
}

@media (max-width: 575.98px) {
  .bp-share-grid .bp-share-btn__label {
    display: none;
  }

  .bp-share-btn {
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border-radius: 50%;
  }

  .bp-share-url-wrapper {
    flex-direction: column;
  }

  .bp-share-url-copy {
    justify-content: center;
  }
}
