/* Bolo do Dia Plugin Styles */

/* Reset e estilos base */
.bolo-do-dia-container *,
.bolo-do-dia-widget * {
    box-sizing: border-box;
}

/* Animações globais */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

/* Estilos para loading */
.bolo-do-dia-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #666;
}

.bolo-do-dia-loading::before {
    content: "🍰";
    font-size: 24px;
    margin-right: 10px;
    animation: bounce 2s infinite;
}

/* Estilos para erro */
.bolo-do-dia-error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin: 20px 0;
}

.bolo-do-dia-error::before {
    content: "⚠️";
    margin-right: 8px;
}

/* Estilos para quando não há bolo configurado */
.bolo-do-dia-no-cake {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #6c757d;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.bolo-do-dia-no-cake::before {
    content: "🤷‍♀️";
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

/* Melhorias de acessibilidade */
.bolo-do-dia-container a:focus,
.bolo-do-dia-widget a:focus {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

.btn-ver-produto:focus,
.btn-comprar:focus,
.btn-widget:focus {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

/* Estilos para impressão */
@media print {
    .bolo-do-dia-container,
    .bolo-do-dia-widget {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .bolo-do-dia-actions,
    .widget-actions {
        display: none !important;
    }
    
    .promo-badge,
    .promo-overlay {
        background: #000 !important;
        color: white !important;
    }
}

/* Estilos para temas escuros */
@media (prefers-color-scheme: dark) {
    .bolo-do-dia-container {
        background: linear-gradient(135deg, #2c3e50, #34495e);
        border-color: #4a5f7a;
        color: white;
    }
    
    .bolo-do-dia-header {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
    }
    
    .product-name a {
        color: white;
    }
    
    .product-name a:hover {
        color: #f39c12;
    }
    
    .product-description {
        color: #bdc3c7;
    }
    
    .bolo-do-dia-footer {
        background: #34495e;
        border-color: #4a5f7a;
    }
    
    .promo-info {
        color: #bdc3c7;
    }
}

/* Estilos para dispositivos com movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .bolo-do-dia-container,
    .bolo-do-dia-widget,
    .bolo-do-dia-image img,
    .btn-ver-produto,
    .btn-comprar,
    .btn-widget {
        transition: none !important;
        animation: none !important;
    }
    
    .promo-badge,
    .promo-overlay {
        animation: none !important;
    }
}

/* Estilos para alto contraste */
@media (prefers-contrast: high) {
    .bolo-do-dia-container,
    .bolo-do-dia-widget {
        border: 2px solid #000;
    }
    
    .bolo-do-dia-header {
        background: #000;
        color: #fff;
    }
    
    .promotional-price,
    .promo-price {
        color: #000;
        font-weight: 900;
    }
    
    .btn-comprar,
    .btn-widget.btn-primary {
        background: #000;
        border: 2px solid #000;
        color: #fff;
    }
    
    .btn-ver-produto,
    .btn-widget {
        background: #fff;
        border: 2px solid #000;
        color: #000;
    }
}

/* Estilos para telas pequenas */
@media (max-width: 480px) {
    .bolo-do-dia-container {
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .bolo-do-dia-content {
        padding: 15px;
        gap: 15px;
    }
    
    .bolo-do-dia-header {
        padding: 12px 15px;
    }
    
    .bolo-do-dia-title {
        font-size: 18px;
    }
    
    .product-name {
        font-size: 20px;
    }
    
    .promotional-price {
        font-size: 24px;
    }
    
    .bolo-do-dia-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-ver-produto,
    .btn-comprar {
        width: 100%;
        text-align: center;
    }
}

/* Estilos para telas muito pequenas */
@media (max-width: 320px) {
    .bolo-do-dia-image {
        flex: 0 0 120px;
    }
    
    .bolo-do-dia-image img {
        height: 120px;
    }
    
    .product-name {
        font-size: 18px;
    }
    
    .promotional-price {
        font-size: 20px;
    }
    
    .price-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Estilos para tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .bolo-do-dia-container {
        max-width: 600px;
        margin: 20px auto;
    }
}

/* Estilos para desktops grandes */
@media (min-width: 1200px) {
    .bolo-do-dia-container {
        max-width: 800px;
        margin: 30px auto;
    }
    
    .bolo-do-dia-content {
        padding: 30px;
        gap: 30px;
    }
    
    .bolo-do-dia-image {
        flex: 0 0 250px;
    }
    
    .bolo-do-dia-image img {
        height: 250px;
    }
}

/* Estilos para modo paisagem em dispositivos móveis */
@media (max-height: 500px) and (orientation: landscape) {
    .bolo-do-dia-content {
        flex-direction: row;
    }
    
    .bolo-do-dia-image {
        flex: 0 0 150px;
    }
    
    .bolo-do-dia-image img {
        height: 150px;
    }
}

/* Estilos para widgets em diferentes posições */
.sidebar .bolo-do-dia-widget {
    margin-bottom: 30px;
}

.footer-widget-area .bolo-do-dia-widget {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.footer-widget-area .bolo-do-dia-widget .widget-header {
    background: rgba(233, 30, 99, 0.8);
}

/* Estilos para integração com temas populares */
.elementor-widget-container .bolo-do-dia-container,
.vc_column-inner .bolo-do-dia-container {
    margin: 0;
}

/* Estilos para WooCommerce */
.woocommerce .bolo-do-dia-container {
    margin: 20px 0;
}

.single-product .bolo-do-dia-container {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 30px;
}

/* Melhorias de performance */
.bolo-do-dia-image img,
.product-image-container img {
    will-change: transform;
}

.bolo-do-dia-container,
.bolo-do-dia-widget {
    will-change: transform, box-shadow;
}

/* Estilos para carregamento lazy */
.bolo-do-dia-image img[loading="lazy"],
.product-image-container img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bolo-do-dia-image img[loading="lazy"].loaded,
.product-image-container img[loading="lazy"].loaded {
    opacity: 1;
}

/* Ajustes de notificações do WooCommerce geradas pelo Bolo do Dia */
.woocommerce .woocommerce-message a:not(.button),
.woocommerce-message a:not(.button) {
    color: #e42552 !important;
    font-weight: 600;
}

.woocommerce .woocommerce-message a:not(.button):hover,
.woocommerce-message a:not(.button):hover {
    color: #c01840 !important;
}
/* Ajuste do link 'Ver carrinho' exibido após adicionar ao carrinho */
.bolo-do-dia-container .added_to_cart,
.bolo-do-dia-widget .added_to_cart {
    color: #e42552 !important;
    font-weight: 600;
}

.bolo-do-dia-container .added_to_cart:hover,
.bolo-do-dia-widget .added_to_cart:hover {
    color: #c01840 !important;
}

.bolo-do-dia-container .added_to_cart:visited,
.bolo-do-dia-widget .added_to_cart:visited {
    color: #b5173a !important;
}

