/**
 * Hook PDF Button Styles
 * Clean and simple styles for the PDF button widget
 */

/* Button Wrapper */
.hook-pdf-button-wrapper {
  display: inline-block;
}

/* Button Base Styles */
.hook-pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: #6d788d;
  color: #fff;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  font-family: inherit;
}

.hook-pdf-button:hover,
.hook-pdf-button:focus {
  color: #fff;
  text-decoration: none;
  outline: none;
  background-color: #5a6474;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hook-pdf-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Icon Styles */
.hook-pdf-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  line-height: 1;
}

.hook-pdf-button-icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.hook-pdf-button-icon i {
  font-size: 1em;
  line-height: 1;
}

/* Icon Position */
.hook-pdf-button-icon-left {
  margin-right: 8px;
  order: -1;
}

.hook-pdf-button-icon-right {
  margin-left: 8px;
  order: 1;
}

/* Text */
.hook-pdf-button-text {
  display: inline-block;
  line-height: inherit;
}

/* Disabled State */
.hook-pdf-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Popup Overlay */
.hook-pdf-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  backdrop-filter: blur(5px);
}

.hook-pdf-popup-overlay.active {
  display: flex;
  animation: hookPDFPopupFadeIn 0.3s ease-in-out;
}

/* E-Reader Device Container */
.hook-pdf-popup-content {
  background: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
  width: 90vw;
  height: 90vh;
  max-width: 800px;
  max-height: 600px;
  animation: hookPDFPopupSlideIn 0.3s ease-out;
  border: 2px solid #333;
}

/* E-Reader Screen */
.hook-pdf-popup-body {
  height: 100%;
  background: #f5f5f5;
  position: relative;
  margin: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.hook-pdf-popup-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

/* E-Reader Brand/Logo Area */
.hook-pdf-popup-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
  background: #1a1a1a;
  color: white;
  border-bottom: 1px solid #333;
  position: relative;
}

.hook-pdf-popup-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hook-pdf-popup-title .hook-pdf-popup-icon {
  font-size: 20px;
  color: #fff;
}

.hook-pdf-popup-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hook-pdf-popup-title p {
  display: none;
}

/* Close Button */
.hook-pdf-popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
  z-index: 10;
}

.hook-pdf-popup-close:hover {
  background: #c82333;
  transform: scale(1.1);
}

.hook-pdf-popup-close span {
  line-height: 1;
}

/* Error Message */
.hook-pdf-popup-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #6c757d;
  font-size: 16px;
  font-style: italic;
  background: #f5f5f5;
}

/* Animations */
@keyframes hookPDFPopupFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hookPDFPopupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hook-pdf-button {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 40px;
  }

  .hook-pdf-popup-content {
    width: 95vw;
    height: 90vh;
    margin: 10px;
  }

  .hook-pdf-popup-body {
    margin: 15px;
  }

  .hook-pdf-popup-title h3 {
    font-size: 14px;
  }

  .hook-pdf-popup-title .hook-pdf-popup-icon {
    font-size: 18px;
  }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  .hook-pdf-popup-content {
    width: 85vw;
    height: 85vh;
  }
}

/* Print Styles */
@media print {
  .hook-pdf-button {
    background-color: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }

  .hook-pdf-popup-overlay {
    display: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .hook-pdf-button {
    border: 2px solid currentColor;
  }
  
  .hook-pdf-popup-close {
    border: 2px solid currentColor;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hook-pdf-button {
    transition: none;
  }
  
  .hook-pdf-button:hover {
    transform: none;
  }

  .hook-pdf-popup-overlay.active,
  .hook-pdf-popup-content {
    animation: none;
  }
  
  .hook-pdf-popup-close:hover {
    transform: none;
  }
} 