/**
 * Thumbnail Preview Styles
 * 
 * Styles for clickable thumbnail previews in cart and checkout.
 * Provides hover effects and full-screen preview overlay.
 * 
 * @package TCRM_Price_Calculator
 * @since 1.0.5
 */

/* Thumbnail wrapper with hover effect */
.tcrm-thumbnail-preview-wrapper {
    position: relative;
    display: inline-block;
cursor: pointer;
}

.tcrm-thumbnail-preview-wrapper img {
    transition: opacity 0.3s ease;
}

.tcrm-thumbnail-preview-wrapper:hover img {
    opacity: 0.8;
}

/* Full-screen preview overlay */
.tcrm-thumbnail-preview-overlay {
    display: none !important;
    position: fixed !important;
 top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 999999 !important;
 cursor: pointer;
    animation: tcrmFadeIn 0.2s ease;
    align-items: center;
    justify-content: center;
}

@keyframes tcrmFadeIn {
    from { opacity: 0; }
  to { opacity: 1; }
}

.tcrm-thumbnail-preview-overlay.active {
    display: flex !important;
}

/* Preview content container */
.tcrm-thumbnail-preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.tcrm-thumbnail-preview-content img {
    max-width: 100%;
    max-height: 90vh;
  width: auto;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

/* Close button */
.tcrm-thumbnail-preview-close {
    position: absolute;
    top: -40px;
  right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: background 0.2s ease;
}

.tcrm-thumbnail-preview-close:hover {
    background: rgba(255, 255, 255, 1);
}

/* Hover hint */
.tcrm-thumbnail-hint {
  position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tcrm-thumbnail-preview-wrapper:hover .tcrm-thumbnail-hint {
    opacity: 1;
}
