/**
 * Frontend styles for Affiliate Lookbook
 *
 * @package AffiliateLookbook
 */

/* Main container */
.affiliate-lookbook-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 20px 0;
}

/* Image wrapper */
.affiliate-lookbook-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.affiliate-lookbook-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Disclosure styling */
.affiliate-lookbook-disclosure {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.affiliate-lookbook-disclosure .disclosure-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.affiliate-lookbook-disclosure .disclosure-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.affiliate-lookbook-disclosure .disclosure-text {
    font-weight: 500;
}

/* Hotspots */
.affiliate-lookbook-hotspot {
    position: absolute;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 10;
    transform: translate(-50%, -50%);
}

.affiliate-lookbook-hotspot .hotspot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #007cba;
    border-radius: 50%;
    color: #007cba;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.affiliate-lookbook-hotspot:hover .hotspot-icon {
    background: #007cba;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

/* Hotspot styles */
.hotspot-style-plus .hotspot-icon {
    border-radius: 4px;
}

.hotspot-style-square .hotspot-icon {
    border-radius: 2px;
}

.hotspot-style-circle .hotspot-icon {
    border: 3px solid #007cba;
    background: transparent;
}

.hotspot-style-circle:hover .hotspot-icon {
    background: #007cba;
}

/* Animations */
.animations-enabled .affiliate-lookbook-hotspot .hotspot-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(0, 124, 186, 0.7);
    }
    70% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(0, 124, 186, 0);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(0, 124, 186, 0);
    }
}

.animations-enabled .affiliate-lookbook-hotspot:hover .hotspot-icon {
    animation: none;
}

/* Popup */
.affiliate-lookbook-popup {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0;
    width: 280px;
    max-width: 90vw;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.affiliate-lookbook-hotspot:hover .affiliate-lookbook-popup {
    opacity: 1;
    visibility: visible;
}

/* Popup arrow */
.affiliate-lookbook-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
}

/* Popup content */
.popup-image {
    width: 100%;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.popup-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.popup-content {
    padding: 16px;
}

.popup-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.popup-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popup-price {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
    margin: 0 0 16px 0;
}

.popup-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white !important;
    text-decoration: none !important;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.popup-cta-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004066 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    color: white !important;
    text-decoration: none !important;
}

/* Popup templates */
.popup-template-card {
    border: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.popup-template-overlay {
    background: rgba(0, 0, 0, 0.95);
    color: white;
    border: none;
}

.popup-template-overlay .popup-title {
    color: white;
}

.popup-template-overlay .popup-description {
    color: #ccc;
}

/* Mobile products list */
.affiliate-lookbook-mobile-products {
    display: none;
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.affiliate-lookbook-mobile-products h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.mobile-product-card {
    display: flex;
    background: white;
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    gap: 16px;
}

.mobile-product-card:last-child {
    margin-bottom: 0;
}

.mobile-product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.mobile-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mobile-product-details h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.mobile-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #e74c3c;
    margin: 0 0 12px 0;
}

.mobile-cta-button {
    display: inline-block;
    background: #007cba;
    color: white !important;
    text-decoration: none !important;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    align-self: flex-start;
    transition: background 0.3s ease;
}

.mobile-cta-button:hover {
    background: #005a87;
    color: white !important;
    text-decoration: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .affiliate-lookbook-container {
        margin: 16px 0;
    }
    
    .affiliate-lookbook-hotspot {
        width: 32px;
        height: 32px;
    }
    
    .affiliate-lookbook-hotspot .hotspot-icon {
        font-size: 14px;
    }
    
    .affiliate-lookbook-popup {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
        margin-top: 0;
        border-radius: 12px;
    }
    
    .affiliate-lookbook-popup::before {
        display: none;
    }
    
    .affiliate-lookbook-mobile-products {
        display: block;
    }
    
    .affiliate-lookbook-disclosure {
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .affiliate-lookbook-hotspot {
        width: 28px;
        height: 28px;
    }
    
    .mobile-product-card {
        flex-direction: column;
        text-align: center;
    }
    
    .mobile-product-image {
        align-self: center;
    }
    
    .mobile-cta-button {
        align-self: center;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .affiliate-lookbook-hotspot:hover .affiliate-lookbook-popup {
        opacity: 0;
        visibility: hidden;
    }
    
    .affiliate-lookbook-hotspot.active .affiliate-lookbook-popup {
        opacity: 1;
        visibility: visible;
    }
    
    .affiliate-lookbook-mobile-products {
        display: block;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .affiliate-lookbook-hotspot .hotspot-icon {
        border-width: 3px;
        background: white;
        color: black;
    }
    
    .affiliate-lookbook-popup {
        border-width: 2px;
        border-color: black;
    }
    
    .affiliate-lookbook-disclosure {
        border-width: 2px;
        border-color: black;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .affiliate-lookbook-hotspot .hotspot-icon {
        animation: none !important;
        transition: none !important;
    }
    
    .affiliate-lookbook-popup {
        transition: none !important;
    }
    
    .popup-cta-button {
        transition: none !important;
    }
    
    .popup-cta-button:hover {
        transform: none !important;
    }
}

/* Print styles */
@media print {
    .affiliate-lookbook-hotspot {
        display: none;
    }
    
    .affiliate-lookbook-mobile-products {
        display: block;
        background: white;
        border: 1px solid #ccc;
    }
    
    .affiliate-lookbook-disclosure {
        background: white;
        border: 1px solid #000;
        color: black;
    }
}