/* ============================================================
   ARQUIVO: widgets.css
   FUNÇÃO: Estilos personalizados para widgets da sidebar
   ============================================================ */

/* ============================================================
   WIDGET - POSTS RECENTES
   ============================================================ */

.widget_recent_entries {
    background: linear-gradient(135deg, #ffffff 0%, #fef5fb 100%);
    border: 2px solid rgba(217, 70, 166, 0.1);
}

.widget_recent_entries .widget-title {
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.widget_recent_entries .widget-title:before {
    content: '—';
    color: var(--primary-color);
    font-weight: 900;
    font-size: 1.5rem;
}

.widget_recent_entries ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget_recent_entries li {
    margin-bottom: 1rem;
    padding: 0;
    border: none;
    counter-increment: item;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.widget_recent_entries li:last-child {
    margin-bottom: 0;
}

.widget_recent_entries li:before {
    content: counter(item);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(217, 70, 166, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.widget_recent_entries a {
    color: var(--text-color);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    display: block;
    transition: all var(--transition-fast);
    flex: 1;
}

.widget_recent_entries a:hover {
    color: var(--primary-color);
}

.widget_recent_entries .post-date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.375rem;
}

.widget_recent_entries .post-date:before {
    content: '👁️';
    font-size: 0.875rem;
}

/* ============================================================
   WIDGET - MELHORES ARTIGOS (POPULAR POSTS)
   ============================================================ */

.monetypress_popular_posts {
    background: linear-gradient(135deg, #ffffff 0%, #fef5fb 100%);
    border: 2px solid rgba(217, 70, 166, 0.1);
}

.monetypress_popular_posts .widget-title {
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.monetypress_popular_posts .widget-title:before {
    content: '—';
    color: var(--primary-color);
    font-weight: 900;
    font-size: 1.5rem;
}

.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0;
}

.popular-post-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.popular-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.popular-post-title {
    color: var(--text-color);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    transition: all var(--transition-fast);
}

.popular-post-title:hover {
    color: var(--primary-color);
}

.popular-post-views {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.popular-post-views svg {
    width: 14px;
    height: 14px;
}

/* ============================================================
   WIDGET - CATEGORIAS
   ============================================================ */

.widget_categories {
    background: linear-gradient(135deg, #ffffff 0%, rgba(var(--primary-color-rgb), 0.03) 100%);
    border: 2px solid rgba(var(--primary-color-rgb), 0.1);
}

.widget_categories .widget-title {
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.widget_categories .widget-title:before {
    content: '—';
    color: var(--primary-color);
    font-weight: 900;
    font-size: 1.5rem;
}

.widget_categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget_categories li {
    margin: 0;
    padding: 0;
    border: none;
}

.widget_categories a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--category-bg-color, rgba(var(--primary-color-rgb), 0.1));
    border-radius: var(--radius-full);
    color: var(--category-text-color, var(--text-color));
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.widget_categories a:hover {
    background: var(--category-hover-bg-color, var(--primary-color));
    color: var(--category-hover-text-color, #ffffff);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.widget_categories .count {
    display: none;
}

/* ============================================================
   WIDGET - TAGS
   ============================================================ */

.widget_tag_cloud {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
    border: 2px solid rgba(245, 158, 11, 0.1);
}

.widget_tag_cloud .widget-title {
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 3px solid #f59e0b;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.widget_tag_cloud .widget-title:before {
    content: '🏷️';
    font-size: 1.25rem;
}

.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget_tag_cloud a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    color: var(--text-color);
    font-size: 0.875rem !important;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.widget_tag_cloud a:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

/* ============================================================
   WIDGET - PESQUISA
   ============================================================ */

.widget_search {
    background: linear-gradient(135deg, #ffffff 0%, rgba(var(--primary-color-rgb), 0.05) 100%);
    border: 2px solid rgba(var(--primary-color-rgb), 0.1);
}

.widget_search .widget-title {
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
}

.widget_search .widget-title:before {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23d946a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
}

.widget_search .search-form {
    position: relative;
}

.widget_search .search-field {
    width: 100%;
    padding: 0.875rem 3.5rem 0.875rem 1rem;
    border: 2px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.widget_search .search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.widget_search .search-submit {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    color: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
    text-indent: -9999px;
}

.widget_search .search-submit:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.widget_search .search-submit:hover {
    background: var(--primary-dark, var(--primary-color));
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

/* ============================================================
   WIDGET - GENÉRICO
   ============================================================ */

.single-sidebar .widget {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
}

.single-sidebar .widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.single-sidebar .widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-color);
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 992px) {
    .single-sidebar .widget {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .widget_recent_entries .widget-title,
    .widget_categories .widget-title,
    .widget_tag_cloud .widget-title,
    .widget_search .widget-title {
        font-size: 1rem;
    }
    
    .widget_categories a {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
    
    .widget_tag_cloud a {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem !important;
    }
}

/* Counter para listas numeradas */
.widget_recent_entries ul {
    counter-reset: item;
}

.widget_recent_entries li {
    counter-increment: item;
}

/* ============================================================
   WIDGET - AUTHOR BOX (SIDEBAR)
   ============================================================ */

.monetypress_author_box {
    background: linear-gradient(135deg, #fef5fb 0%, #ffffff 100%);
    border: 2px solid rgba(217, 70, 166, 0.15);
}

.widget-author-box {
    text-align: center;
}

.widget-author-avatar {
    margin-bottom: 1rem;
}

.widget-author-avatar a {
    display: inline-block;
}

.widget-author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50% !important;
    border: 3px solid var(--primary-color);
    object-fit: cover;
    transition: transform var(--transition-base);
}

.widget-author-avatar img:hover {
    transform: scale(1.05);
}

.widget-author-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.widget-author-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.widget-author-name a {
    color: var(--text-color);
    transition: color var(--transition-fast);
}

.widget-author-name a:hover {
    color: var(--primary-color);
}

.widget-author-bio {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.widget-author-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary-color);
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    text-decoration: none;
}

.widget-author-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 70, 166, 0.3);
}

.widget-author-link svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   WIDGET - PESQUISA MODERNA
   ============================================================ */

.monetypress_search {
    background: linear-gradient(135deg, #f3e8ff 0%, #ffffff 100%);
    border: 2px solid rgba(168, 85, 247, 0.15);
}

.monetypress_search .widget-title {
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 3px solid #a855f7;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.monetypress_search .widget-title:before {
    content: '—';
    color: #a855f7;
    font-weight: 900;
    font-size: 1.5rem;
}

.modern-search-widget {
    width: 100%;
}

.modern-search-form {
    width: 100%;
}

.modern-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.modern-search-wrapper:focus-within {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.modern-search-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: #a855f7;
    pointer-events: none;
    z-index: 1;
}

.modern-search-field {
    flex: 1;
    padding: 0.875rem 3.5rem 0.875rem 3rem;
    border: none;
    font-size: 0.9375rem;
    color: var(--text-color);
    background: transparent;
}

.modern-search-field:focus {
    outline: none;
}

.modern-search-field::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.modern-search-submit {
    position: absolute;
    right: 0.5rem;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modern-search-submit:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.modern-search-submit svg {
    width: 20px;
    height: 20px;
}
