/* Sidebar Premium Styles - Simples Finanças */

:root {
    --primary-color: #0056b3;
    --card-bg: white;
    --border-color: #e2e8f0;
    --text-color: #1a202c;
    --muted: #f7fafc;
}

.dark {
    --card-bg: #1a202c;
    --border-color: #2d3748;
    --text-color: #f7fafc;
    --muted: #2d3748;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

.widget {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    margin-bottom: 2.5rem;
    box-shadow: none !important;
}

.widget:hover {
    box-shadow: none !important;
    background: transparent !important;
    transform: none !important;
}

.widget h3 {
    font-size: 1.2rem;
    font-weight: 850;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 15px;
    line-height: 1.5;
    border-bottom: none !important;
}

.widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    pointer-events: none;
}

.video-widget h3::after,
.posts-widget h3::after,
.categories-widget h3::after,
.sf-promotions-widget h3::after {
    background: var(--primary-color) !important;
}

.widget h3 i {
    width: 32px;
    height: 32px;
    background: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px; /* QUADRADO conforme solicitado */
    line-height: 1;
    box-shadow: none !important;
    border: none !important;
}

.video-widget h3 i {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
}

.posts-widget h3 i {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

/* Newsletter Card na Sidebar */
.newsletter-card {
    background: linear-gradient(135deg, #021a36 0%, #0056b3 100%);
    color: white;
    border-radius: 12px;
    padding: 2.5rem 1.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    border: none;
    margin-bottom: 2rem;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm56-76c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c3.314 0 6-2.686 6-6s-2.686-6-6-6-6 2.686-6 6 2.686 6 6 6zm-45 44c3.314 0 6-2.686 6-6s-2.686-6-6-6-6 2.686-6 6 2.686 6 6 6zm50 2c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm-23 28c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd' /%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.newsletter-card h3 {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 850;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.newsletter-card p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.newsletter-card form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-card input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: white !important;
    font-size: 0.9rem !important;
    outline: none !important;
    transition: all 0.3s !important;
    text-align: center !important;
    width: 100% !important;
}

.newsletter-card input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.newsletter-card input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.newsletter-card .btn-subscribe {
    background: white !important;
    color: #0056b3 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px !important;
    font-family: inherit !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    width: 100% !important;
}

.newsletter-card .btn-subscribe:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
    opacity: 0.95 !important;
}

/* Estilização da Lista de Vídeos e Posts na Sidebar */
.video-item-small {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    margin-bottom: 0;
}

.video-item-small:hover {
    background: var(--muted);
    color: var(--primary-color);
}

.video-thumbnail-small {
    width: 90px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.video-thumbnail-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail-small .video-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.video-thumbnail-small .video-thumb-play i {
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding-left: 1px;
}

.video-info-small h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reduz espaçamento vertical entre os cards de vídeo na sidebar */
.sidebar .video-preview-list {
    gap: 6px;
}

/* Promoções (Carrossel de Afiliados) */
.sf-promotions-widget .sf-aff-carousel {
    height: auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.dark .sf-promotions-widget .sf-aff-carousel {
    background: rgba(17, 17, 17, 0.4);
}

.sf-promotions-widget .sf-aff-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-out;
}

.sf-promotions-widget .sf-aff-slide {
    width: 100%;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sf-promotions-widget .sf-aff-link {
    width: 100%;
    height: 100%;
    display: block;
}

.sf-promotions-widget .sf-aff-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sf-promotions-widget .sf-aff-dots {
    position: absolute;
    inset-inline: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.sf-promotions-widget .sf-aff-dots button {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.25);
    border: 0;
    outline: none;
    padding: 0;
}

.dark .sf-promotions-widget .sf-aff-dots button {
    background: rgba(255, 255, 255, 0.25);
}

.sf-promotions-widget .sf-aff-dots button[aria-current="true"] {
    background: rgba(15, 23, 42, 0.65);
}

.dark .sf-promotions-widget .sf-aff-dots button[aria-current="true"] {
    background: rgba(255, 255, 255, 0.6);
}

/* Correções para o Search Widget e Light/Dark mode */
.search-widget {
    background: transparent !important;
}

.search-widget h3 {
    color: var(--text-color) !important;
}

.search-widget .search-input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px 0 0 6px;
    border-right: none;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: inherit;
    outline: none;
}

.search-widget .search-input-field:focus {
    border-color: var(--primary-color);
}

.search-widget .search-input-field::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}

.search-widget .search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: opacity 0.3s;
    outline: none;
}

.search-widget .search-btn:hover {
    opacity: 0.9;
}
