/**
 * EHT Document Module - Frontend Styles
 */

.ehtdocument-thumbnail-container {
    display: block;
    width: 140px;
    max-width: 100%;
    margin: 0 auto 15px auto;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none !important;
}

.ehtdocument-thumbnail-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.ehtdocument-thumbnail-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.414; /* Standard A4 aspect ratio */
    object-fit: cover;
    object-position: top center;
    border: none;
}

/* Specific theme overrides for PS Classic Theme */
.product-attachments .attachment.ehtdocument-processed {
   flex: 0 0 auto;
   min-width: 220px;
   padding: 20px 15px;
   border: 1px solid #eee;
   border-radius: 8px;
   background: #fdfdfd;
   margin-bottom: 20px;
}

.product-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Fix for link styling when attachment is hovered */
.product-attachments .attachment.ehtdocument-processed h4 a {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 1.1rem;
    color: #232323;
}

.product-attachments .attachment.ehtdocument-processed h4 a:hover {
    color: #2fb5d2;
}

/* Hide fallback styling nicely */
img.ehtdocument-thumbnail-image[src*="default-pdf"] {
    object-fit: contain;
    padding: 10px;
    background: #f5f5f5;
}
