/**
 * Share Design Modal Styles
 * POD Master - Storefront Customizer
 * @version 1.0
 * @date 2025-12-23
 */

/* Share Modal Content */
.pc-share-modal-content {
  max-width: 520px;
  position: relative;
}

/* Loading State */
.pc-modal.loading .pc-modal-body {
  opacity: 0.5;
  pointer-events: none;
}

.pc-modal.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid var(--pc-surface-muted, #f1f5f9);
  border-top-color: var(--pc-action-primary, #0ea5e9);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 1000;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.pc-share-info {
  margin-bottom: 20px;
  text-align: center;
}

.pc-share-design-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--pc-text-primary, #1f2937);
  margin: 0 0 8px 0;
}

.pc-share-description {
  font-size: 14px;
  color: var(--pc-text-secondary, #475569);
  margin: 0;
}

/* Share URL Container */
.pc-share-url-container {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.pc-share-url-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--pc-border-input, #cbd5e1);
  border-radius: 8px;
  font-size: 14px;
  background: var(--pc-surface-muted, #f1f5f9);
  color: var(--pc-text-primary, #1f2937);
  font-family: 'Courier New', monospace;
}

.pc-btn-copy-link {
  padding: 10px 16px;
  background: var(--pc-action-primary, #0ea5e9);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-btn-copy-link:hover {
  background: var(--pc-action-primary-hover, #0284c7);
}

.pc-btn-copy-link i {
  font-size: 16px;
}

/* Share Buttons Grid */
.pc-share-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.pc-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.pc-share-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.pc-share-btn span {
  font-weight: 500;
}

.pc-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pc-share-btn:active {
  transform: translateY(0);
}

/* WhatsApp */
.pc-share-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.pc-share-whatsapp:hover {
  background: linear-gradient(135deg, #1EBD5B 0%, #0F7A6C 100%);
}

/* Facebook */
.pc-share-facebook {
  background: linear-gradient(135deg, #1877F2 0%, #0C5DBD 100%);
}

.pc-share-facebook:hover {
  background: linear-gradient(135deg, #166FE5 0%, #0A4FA3 100%);
}

/* Telegram */
.pc-share-telegram {
  background: linear-gradient(135deg, #0088CC 0%, #006699 100%);
}

.pc-share-telegram:hover {
  background: linear-gradient(135deg, #007AB8 0%, #005580 100%);
}

/* Instagram */
.pc-share-instagram {
  background: linear-gradient(135deg, #E1306C 0%, #C13584 50%, #833AB4 100%);
}

.pc-share-instagram:hover {
  background: linear-gradient(135deg, #D1285F 0%, #B02F77 50%, #7432A0 100%);
}

/* Copy Link */
.pc-share-copy {
  background: linear-gradient(135deg, #64748B 0%, #475569 100%);
}

.pc-share-copy:hover {
  background: linear-gradient(135deg, #5B6979 0%, #3E4A5A 100%);
}

/* Share Button in Design Card */
.pc-design-card-share-btn {
  padding: 6px 12px;
  background: var(--pc-action-secondary, #6366f1);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pc-design-card-share-btn:hover {
  background: var(--pc-action-secondary, #5558e3);
  transform: translateY(-1px);
}

.pc-design-card-share-btn i {
  font-size: 12px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .pc-share-modal-content {
    max-width: 95%;
    margin: 20px auto;
  }

  .pc-share-buttons-grid {
    grid-template-columns: 1fr;
  }

  .pc-share-btn {
    padding: 16px 20px;
  }

  .pc-share-url-container {
    flex-direction: column;
  }

  .pc-btn-copy-link {
    width: 100%;
  }
}

/* Copy Success Animation */
@keyframes copySuccess {
  0% { background: var(--pc-action-primary, #0ea5e9); }
  50% { background: #10b981; }
  100% { background: var(--pc-action-primary, #0ea5e9); }
}

.pc-btn-copy-link.copied {
  animation: copySuccess 0.6s ease;
}

.pc-btn-copy-link.copied i:before {
  content: "\f00c";
}
