/* 
 * Estilos do Sistema de Anúncios
 * 
 * Estilos globais para todos os componentes de anúncios
 */

/* Container de Anúncios */
.anuncio-container {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    margin: 16px 0;
}

.anuncio-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.anuncio-label {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Anúncio de Texto */
.anuncio-texto {
    padding: 16px;
    min-height: 100px;
}

.anuncio-texto .anuncio-link {
    display: block;
    text-decoration: none;
    color: #1f2937;
}

.anuncio-texto .anuncio-titulo {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #111827;
    line-height: 1.3;
}

.anuncio-texto .anuncio-descricao {
    font-size: 14px;
    color: #4b5563;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.anuncio-texto .anuncio-cta {
    color: #2563eb;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.anuncio-texto .anuncio-cta:hover {
    color: #1d4ed8;
}

/* Anúncio com Imagem */
.anuncio-imagem {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

@media (min-width: 768px) {
    .anuncio-imagem {
        flex-direction: row;
    }
}

.anuncio-imagem .anuncio-link {
    display: flex;
    text-decoration: none;
    color: #1f2937;
    flex: 1;
}

.anuncio-imagem .anuncio-imagem-element {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .anuncio-imagem .anuncio-imagem-element {
        width: 200px;
        height: 150px;
        flex-shrink: 0;
    }
}

.anuncio-imagem .anuncio-conteudo {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.anuncio-imagem .anuncio-titulo {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #111827;
    line-height: 1.3;
}

.anuncio-imagem .anuncio-descricao {
    font-size: 14px;
    color: #4b5563;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.anuncio-imagem .anuncio-cta {
    color: #2563eb;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.anuncio-imagem .anuncio-cta:hover {
    color: #1d4ed8;
}

/* Anúncio com Vídeo */
.anuncio-video {
    position: relative;
    aspect-ratio: 16/9;
    max-height: 300px;
    min-height: 200px;
}

.anuncio-video .anuncio-link {
    display: block;
    text-decoration: none;
    color: #1f2937;
    width: 100%;
    height: 100%;
    position: relative;
}

.anuncio-video .anuncio-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.anuncio-video .anuncio-conteudo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px;
    color: white;
}

.anuncio-video .anuncio-titulo {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #ffffff;
    line-height: 1.3;
}

.anuncio-video .anuncio-descricao {
    font-size: 14px;
    color: #f3f4f6;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.anuncio-video .anuncio-cta {
    color: #60a5fa;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.anuncio-video .anuncio-cta:hover {
    color: #3b82f6;
}

/* Variações por localização */

/* Hero Banner */
.anuncio-hero {
    border: none;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

.anuncio-hero .anuncio-container {
    border: none;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

/* Sidebar */
.anuncio-sidebar {
    margin: 0 0 20px 0;
}

.anuncio-sidebar .anuncio-container {
    border-radius: 4px;
}

/* Conteúdo Inline */
.anuncio-conteudo {
    margin: 24px 0;
    border-left: 4px solid #3b82f6;
}

.anuncio-conteudo .anuncio-container {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* Compacto para busca */
.anuncio-compacto {
    margin: 12px 0;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.anuncio-compacto .anuncio-container {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #f9fafb;
}

.anuncio-compacto .anuncio-texto {
    padding: 12px;
    min-height: 80px;
}

.anuncio-compacto .anuncio-titulo {
    font-size: 14px;
}

.anuncio-compacto .anuncio-descricao {
    font-size: 13px;
    margin-bottom: 8px;
}

/* Footer */
.anuncio-footer {
    margin: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.anuncio-footer .anuncio-container {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Responsividade */
@media (max-width: 767px) {
    .anuncio-container {
        margin: 0 -16px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .anuncio-hero .anuncio-container,
    .anuncio-footer .anuncio-container {
        margin: 0;
    }
    
    .anuncio-sidebar {
        margin: 0 -16px 20px -16px;
    }
    
    .anuncio-conteudo {
        margin: 16px 0;
        border-left: none;
    }
    
    .anuncio-compacto {
        margin: 8px 0;
    }
}

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

.anuncio-container {
    animation: fadeIn 0.3s ease-out;
}

/* Estados de erro */
.anuncio-container img[src=""],
.anuncio-container img:not([src]) {
    display: none;
}

/* Placeholder para quando não há anúncio */
.anuncio-placeholder {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 14px;
}

/* Estilo de indicação de espaços publicitários (para admin) */
.espaco-publicitario-indicador {
    position: relative;
}

.espaco-publicitario-indicador::before {
    content: attr(data-espaco-nome);
    position: absolute;
    top: -20px;
    left: 0;
    background: #10b981;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 100;
    font-weight: 500;
}