/**
 * EmotionBox PDF Viewer Styling
 * Global styling for PDF viewer modal and icons
 */

/* PDF Icon Styling - ensure consistent styling for all PDF icons */
.emotion-pdf-icon {
    cursor: pointer !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important;
    display: inline-block !important;
  }
  
  a.emotion-pdf-icon {
    text-decoration: none !important;
  }
  
  .emotion-pdf-icon:hover {
    opacity: 0.85 !important;
    transform: scale(1.05) !important;
  }
  
  /* Icon in product gallery (maintain existing rotated styling) */
  .emotion-product-gallery .emotion-pdf-icon {
    height: 48px !important;
    width: 48px !important;
    display: block !important;
    position: absolute !important;
    bottom: 4rem !important;
    left: 25% !important;
    transform: rotate(90deg) !important;
  }
  
  .emotion-product-gallery .emotion-pdf-icon:hover {
    transform: rotate(90deg) scale(1.1) !important;
  }
  
  /* PDF Modal Styling - ensure this is included globally */
  .emotion-pdf-active {
    overflow: hidden !important;
  }
  
  .emotion-pdf-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 99999 !important;
    flex-direction: column !important;
  }
  
  .emotion-pdf-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 20px !important;
    background: #f5f5f5 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .emotion-pdf-title {
    margin: 0 !important;
    color: #333 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 80% !important;
  }
  
  .emotion-pdf-close {
    font-size: 28px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    color: #333 !important;
    line-height: 1 !important;
    transition: color 0.3s ease !important;
  }
  
  .emotion-pdf-close:hover {
    color: #ef6368 !important;
  }
  
  .emotion-pdf-container {
    flex: 1 !important;
    width: 100% !important;
    height: calc(100% - 60px) !important;
    position: relative !important;
    background: #f5f5f5 !important;
    z-index: 99999 !important;
  }
  
  .emotion-pdf-loading {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 20px 30px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    z-index: 2 !important;
    font-weight: 500 !important;
  }
  
  .emotion-pdf-viewer {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: white !important;
  }
  
  /* CSS for inline PDF icon links (not in the gallery) */
  a.emotion-pdf-icon:not(.emotion-product-gallery .emotion-pdf-icon) {
    display: inline-flex !important;
    align-items: center !important;
    color: #b7bcbf !important; /* Match your site's color scheme */
    font-size: 0.9rem !important;
    margin: 0.5rem 0 !important;
  }
  
  a.emotion-pdf-icon:not(.emotion-product-gallery .emotion-pdf-icon):before {
    content: "" !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 0.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg fill='%23b7bcbf' width='800px' height='800px' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 3H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zm-7 14H7v-2h5v2zm3-4H7v-2h8v2zm0-4H7V7h8v2z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    flex-shrink: 0 !important;
  }
  
  a.emotion-pdf-icon:not(.emotion-product-gallery .emotion-pdf-icon):hover {
    color: #ef6368 !important; /* Match your highlight color */
  }
  
  /* Responsive styling */
  @media (max-width: 768px) {

    .emotion-pdf-modal {
        top: 0px !important;
    }

    .emotion-pdf-modal-header {
      padding: 10px 15px !important;
    }
    
    .emotion-pdf-title {
      font-size: 16px !important;
    }
    
    /* Adjust gallery-specific positioning for mobile */
    .emotion-product-gallery .emotion-pdf-icon {
      bottom: 1rem !important;
      left: 35% !important;
      transform: translateX(-50%) rotate(90deg) !important;
    }
    
    .emotion-product-gallery .emotion-pdf-icon:hover {
      transform: translateX(-50%) rotate(90deg) scale(1.1) !important;
    }
    
    a.emotion-pdf-icon:not(.emotion-product-gallery .emotion-pdf-icon) {
      font-size: 0.85rem !important;
    }
    
    a.emotion-pdf-icon:not(.emotion-product-gallery .emotion-pdf-icon):before {
      width: 18px !important;
      height: 18px !important;
    }
  }