/* Photocard Download Button Styles */
.pcd-download-button-wrapper {
  margin: 20px 0;
  text-align: center;
}

.pcd-download-button {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  text-decoration: none;
}

.pcd-download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  color: white;
}

.pcd-download-button:active {
  transform: translateY(0);
}

.pcd-download-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Editor Page Styles */
.pcd-editor-page {
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  font-family: "Noto Sans Bengali", "SolaimanLipi", Arial, sans-serif;
}

.pcd-editor-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.pcd-editor-title {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  color: #333;
  margin-bottom: 40px;
}

.pcd-editor-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}

.pcd-photocard-wrapper {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  flex: 1;
  max-width: 600px;
}

.pcd-photocard {
  font-family: "Noto Sans Bengali", "SolaimanLipi", Arial, sans-serif;
  width: 100%;
  height: auto;
}

.pcd-editor-controls {
  flex: 1;
  min-width: 300px;
  max-width: 450px;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.pcd-control-group {
  margin-bottom: 30px;
}

.pcd-control-group label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.pcd-control-group input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
}

.pcd-control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
}

.pcd-control-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
}

.pcd-control-group span {
  display: inline-block;
  margin-top: 5px;
  font-size: 14px;
  color: #666;
  font-weight: 600;
}

.pcd-share-section {
  padding: 15px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 10px;
  margin-bottom: 25px;
}

.pcd-share-section label {
  color: #2c3e50;
  font-size: 16px;
  margin-bottom: 12px;
}

.pcd-share-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pcd-btn-sm {
  padding: 8px;
  font-size: 0;
}

.pcd-btn-sm svg {
  width: 18px;
  height: 18px;
  margin: 0;
}

.pcd-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease, background 0.3s ease, color 0.3s ease;
  background: #6c757d;
  color: white;
}

.pcd-btn-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pcd-btn-facebook {
  background: #1877f2;
}

.pcd-btn-facebook:hover {
  background: #145dbf;
}

.pcd-btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.pcd-btn-instagram:hover {
  background: linear-gradient(45deg, #d87b2a 0%, #c95a33 25%, #b91f38 50%, #a91d5a 75%, #991577 100%);
}

.pcd-btn-twitter {
  background: #1da1f2;
}

.pcd-btn-twitter:hover {
  background: #0d8bd9;
}

.pcd-btn-linkedin {
  background: #0077b5;
}

.pcd-btn-linkedin:hover {
  background: #005885;
}

.pcd-btn-whatsapp {
  background: #25d366;
}

.pcd-btn-whatsapp:hover {
  background: #1da851;
}

.pcd-editor-actions {
  display: flex;
  gap: 15px;
  margin-top: 40px;
}

.pcd-btn {
  flex: 1;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pcd-btn-secondary {
  background: #6c757d;
  color: white;
}

.pcd-btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.pcd-btn-primary {
  background: #28a745;
  color: white;
}

.pcd-btn-primary:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.pcd-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pcd-footer-credit {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  font-size: 14px;
}

.pcd-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: pcd-spin 1s ease-in-out infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes pcd-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Template-specific styles with !important to force override inline styles */
/* Custom Template - Uses admin color settings (NO !important) */
.pcd-template-custom .pcd-photocard {
  /* Uses inline styles from admin settings */
}

/* Classic Template - Red/Crimson theme */
.pcd-template-classic .pcd-photocard {
  box-shadow: 0 10px 30px rgba(196, 30, 58, 0.3) !important;
}

.pcd-template-classic .pcd-bottom-dots div {
  background: #c41e3a !important;
  animation: pcd-pulse 2s ease-in-out infinite;
}

.pcd-template-classic .pcd-date {
  color: #000000 !important;
}

.pcd-template-classic .pcd-title {
  color: #000000 !important;
}

.pcd-template-classic .pcd-footer-button > div:first-child,
.pcd-template-classic .pcd-footer-button > div:last-child {
  background: #c41e3a !important;
}

.pcd-template-classic .pcd-footer-button > div:nth-child(2) {
  background: #c41e3a !important;
  color: #ffffff !important;
}

.pcd-template-classic .pcd-social-links {
  background: #c41e3a !important;
}

/* Modern Template - Blue theme */
.pcd-template-modern .pcd-photocard {
  background: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3) !important;
  border: 2px solid rgba(59, 130, 246, 0.1) !important;
}

.pcd-template-modern .pcd-image {
  border-radius: 15px !important;
}

.pcd-template-modern .pcd-bottom-dots div {
  background: #3b82f6 !important;
}

.pcd-template-modern .pcd-date {
  color: #1e293b !important;
}

.pcd-template-modern .pcd-title {
  color: #1e293b !important;
}

.pcd-template-modern .pcd-footer-button > div:first-child,
.pcd-template-modern .pcd-footer-button > div:last-child {
  background: #3b82f6 !important;
}

.pcd-template-modern .pcd-footer-button > div:nth-child(2) {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

.pcd-template-modern .pcd-social-links {
  background: #3b82f6 !important;
}

/* Elegant Template - Gold theme */
.pcd-template-elegant .pcd-photocard {
  background: #fefefe !important;
  box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3) !important;
  border: 3px solid rgba(212, 175, 55, 0.2) !important;
}

.pcd-template-elegant .pcd-title {
  color: #1a1a1a !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

.pcd-template-elegant .pcd-date {
  color: #1a1a1a !important;
}

.pcd-template-elegant .pcd-bottom-dots div {
  background: #d4af37 !important;
}

.pcd-template-elegant .pcd-footer-button > div:first-child,
.pcd-template-elegant .pcd-footer-button > div:last-child {
  background: #d4af37 !important;
}

.pcd-template-elegant .pcd-footer-button > div:nth-child(2) {
  background: #d4af37 !important;
  color: #1a1a1a !important;
}

.pcd-template-elegant .pcd-social-links {
  background: #d4af37 !important;
}

/* Minimal Template - Black & White theme */
.pcd-template-minimal .pcd-photocard {
  background: #ffffff !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid #e5e5e5 !important;
}

.pcd-template-minimal .pcd-image {
  border-radius: 0 !important;
}

.pcd-template-minimal .pcd-date {
  color: #000000 !important;
}

.pcd-template-minimal .pcd-title {
  color: #000000 !important;
}

.pcd-template-minimal .pcd-bottom-dots div {
  background: #000000 !important;
}

.pcd-template-minimal .pcd-footer-button > div:first-child,
.pcd-template-minimal .pcd-footer-button > div:last-child {
  background: #000000 !important;
}

.pcd-template-minimal .pcd-footer-button > div:nth-child(2) {
  background: #000000 !important;
  color: #ffffff !important;
}

.pcd-template-minimal .pcd-social-links {
  background: #000000 !important;
}

@keyframes pcd-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Language-specific font adjustments */
.pcd-photocard[data-language="bengali"] .pcd-title {
  font-family: "Noto Sans Bengali", "Hind Siliguri", sans-serif !important;
}

.pcd-photocard[data-language="hindi"] .pcd-title {
  font-family: "Noto Sans Devanagari", sans-serif !important;
}

.pcd-photocard[data-language="english"] .pcd-title {
  font-family: "Noto Sans", Arial, sans-serif !important;
}

@media (max-width: 768px) {
  .pcd-editor-container {
    padding: 20px 10px;
  }

  .pcd-editor-content {
    flex-direction: column;
    gap: 20px;
  }

  .pcd-photocard-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 15px;
  }

  .pcd-photocard {
    width: 100% !important;
    max-width: 100%;
  }

  .pcd-editor-controls {
    width: 100%;
    max-width: 100%;
    padding: 20px;
  }

  .pcd-editor-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .pcd-share-buttons {
    grid-template-columns: repeat(3, 1fr);
  }

  .pcd-editor-actions {
    flex-direction: column;
    gap: 10px;
  }

  .pcd-btn {
    width: 100%;
  }

  .pcd-download-button {
    width: 100%;
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .pcd-editor-title {
    font-size: 20px;
  }

  .pcd-control-group label {
    font-size: 14px;
  }

  .pcd-btn {
    font-size: 14px;
    padding: 12px 15px;
  }

  .pcd-btn-sm {
    padding: 6px;
  }

  .pcd-btn-sm svg {
    width: 16px;
    height: 16px;
  }

  .pcd-share-section label {
    font-size: 14px;
  }

  .pcd-share-buttons {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}
