/* =============================================
   SHARE BUTTON & TOOLTIP STYLES
   Share Feature - Samyak Gyan UPSC Platform
   NO-GAFA Compliant Implementation
   Updated: Instagram-gradient button with tooltip
   ============================================= */

/* ===== SHARE BUTTON WRAPPER ===== */
.share-btn-wrapper {
  display: inline-block;
  position: relative;
}

/* ===== SHARE BUTTON ===== */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: white;
  color: #333;
  /* Instagram gradient border */
  border: 2px solid transparent;
  background-image:
    linear-gradient(white, white),
    linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.25s ease;
  white-space: nowrap;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn:active {
  transform: scale(1.05);
}

/* Share SVG icon */
.share-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  transition: transform 0.25s ease;
}

.share-icon svg,
.share-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.share-btn:hover .share-icon {
  transform: scale(1.1);
}

.share-text {
  font-size: 15px;
  font-weight: bold;
  color: #1e40ff;
}

/* ===== SHARE MODAL OVERLAY (CENTERED - SAME AS SUMMARY) ===== */
.share-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-modal-overlay.visible {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

/* Share Modal Content (centered box) */
.share-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 0;
  max-width: 400px;
  width: 90%;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Share Modal Header */
.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  font-weight: bold;
  font-size: 1.1rem;
  color: #1f2937;
}

.share-modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #e74c3c;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.share-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.1);
}

/* ===== PLATFORM BUTTONS (HORIZONTAL ROW INSIDE MODAL) ===== */
.share-platform-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  flex-wrap: wrap;
}

.btn-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  min-width: 70px;
  flex: 1;
  max-width: 90px;
}

.btn-platform:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #ddd;
}

.btn-platform:active {
  transform: scale(0.98);
}

/* Platform SVG icons */
.platform-icon {
  width: 32px;
  height: 32px;
  display: block;
}

.platform-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.platform-name {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-align: center;
}

/* ===== COPY CONFIRMATION TOAST ===== */
.copy-confirmation {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #28a745;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  animation: toastSlideIn 0.3s ease;
  pointer-events: none;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ===== QR CODE MODAL OVERLAY (DESKTOP) ===== */
.qr-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.qr-modal-overlay.visible {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

/* QR Modal Content Box */
.qr-modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  padding: 2rem 1.5rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: qrModalSlideIn 0.4s ease;
}

@keyframes qrModalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* QR Close Button */
.qr-modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #e74c3c;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.qr-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.1);
}

/* QR Header Section */
.qr-header {
  margin-bottom: 1.5rem;
}

.qr-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.qr-header p {
  font-size: 1rem;
  font-weight: 600;
  color: #fc7306;
  margin: 0;
  line-height: 1.5;
}

/* QR Code Container */
.qr-code-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  margin: 1rem 0;
  min-height: 320px;
}

.qr-code-container canvas,
.qr-code-container img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* QR Footer Section */
.qr-footer {
  margin-top: 1rem;
}

.qr-footer p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

/* ===== MOBILE/TABLET RESPONSIVE ===== */
@media (max-width: 600px) {
  .share-modal-content {
    max-width: 95%;
  }

  .share-platform-buttons {
    padding: 1rem;
    gap: 8px;
  }

  .btn-platform {
    min-width: 60px;
    max-width: 80px;
    padding: 10px;
  }

  /* QR Modal Mobile Adjustments */
  .qr-modal-content {
    max-width: 92%;
    padding: 1.5rem 1rem;
  }

  .qr-header h2 {
    font-size: 1.1rem;
  }

  .qr-header p {
    font-size: 0.9rem;
  }

  .qr-code-container {
    padding: 1rem;
    min-height: 280px;
  }
}
