/* Ovolon Banner Plugin Styles */

.ovolon-banner {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin: 10px 0;
    font-family: 'Arial', sans-serif;
}

.ovolon-banner:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #007cba;
}

.ovolon-banner-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.ovolon-banner-link:hover {
    text-decoration: none;
    color: inherit;
}

.ovolon-banner-content {
    display: flex;
    align-items: center;
    padding: 10px;
    height: 100%;
    position: relative;
}

/* Ovolon Logo */
.ovolon-logo {
    position: absolute;
    top: 5px;
    right: 10px;
    z-index: 10;
}

.ovolon-logo img {
    max-height: 30px;
    width: auto;
    opacity: 0.8;
}

/* Product Information Container */
.product-info {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.product-image {
    flex-shrink: 0;
}

.product-image img {
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.product-details {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.product-title {
    margin: 0 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1.1em;
    font-weight: bold;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Banner Size: 728x90 (Leaderboard) */
.ovolon-banner-728x90 {
    width: 728px;
    height: 90px;
}

.ovolon-banner-728x90 .product-image img {
    width: 70px;
    height: 70px;
}

.ovolon-banner-728x90 .product-title {
    font-size: 16px;
}

.ovolon-banner-728x90 .product-price {
    font-size: 14px;
}

.ovolon-banner-728x90 .ovolon-logo img {
    max-height: 25px;
}

/* Banner Size: 350x350 (Square) */
.ovolon-banner-350x350 {
    width: 350px;
    height: 350px;
}

.ovolon-banner-350x350 .ovolon-banner-content {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.ovolon-banner-350x350 .product-info {
    flex-direction: column;
    gap: 20px;
}

.ovolon-banner-350x350 .product-image img {
    width: 180px;
    height: 180px;
}

.ovolon-banner-350x350 .product-title {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

.ovolon-banner-350x350 .product-price {
    font-size: 20px;
    padding: 8px 16px;
}

.ovolon-banner-350x350 .ovolon-logo {
    top: 10px;
    right: 15px;
}

.ovolon-banner-350x350 .ovolon-logo img {
    max-height: 35px;
}

/* Error Messages */
.ovolon-banner-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
    font-family: Arial, sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ovolon-banner-728x90 {
        width: 100%;
        max-width: 728px;
        height: auto;
        min-height: 90px;
    }
    
    .ovolon-banner-350x350 {
        width: 100%;
        max-width: 350px;
        height: auto;
        min-height: 300px;
    }
    
    .ovolon-banner-350x350 .product-image img {
        width: 150px;
        height: 150px;
    }
    
    .ovolon-banner-350x350 .product-title {
        font-size: 16px;
    }
    
    .ovolon-banner-350x350 .product-price {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .ovolon-banner-728x90 .product-title {
        font-size: 14px;
    }
    
    .ovolon-banner-728x90 .product-price {
        font-size: 12px;
    }
    
    .ovolon-banner-728x90 .product-image img {
        width: 60px;
        height: 60px;
    }
    
    .ovolon-banner-350x350 .product-image img {
        width: 120px;
        height: 120px;
    }
    
    .ovolon-banner-350x350 .product-title {
        font-size: 14px;
    }
    
    .ovolon-banner-350x350 .product-price {
        font-size: 16px;
    }
}

/* Loading Animation */
.ovolon-banner-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
}

.ovolon-banner-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.ovolon-banner:focus-within {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

.ovolon-banner-link:focus {
    outline: none;
}

/* Print Styles */
@media print {
    .ovolon-banner {
        border: 1px solid #000;
        box-shadow: none;
        background: #fff;
    }
    
    .ovolon-banner::after {
        content: "Visit: " attr(href);
        display: block;
        font-size: 12px;
        margin-top: 5px;
        color: #000;
    }
}