/* =========================================================
   OZD Blog Tema - Widget Stilleri (widgets.css)
   Genel widget, AJAX arama, e-bülten, sosyal, galeri vb.
   ========================================================= */

/* ----------------------------------------------------------
   Genel widget stilleri (ozd_ widgetları için)
---------------------------------------------------------- */

.widget_ozd_latest_posts,
.widget_ozd_popular_posts,
.widget_ozd_most_read_posts,
.widget_ozd_ajax_search,
.widget_ozd_newsletter,
.widget_ozd_colored_categories,
.widget_ozd_social_profiles,
.widget_ozd_related_posts,
.widget_ozd_top_rated_posts,
.widget_ozd_site_stats,
.widget_ozd_mini_about,
.widget_ozd_tabs_posts,
.widget_ozd_author_box,
.widget_ozd_gallery {
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
}

/* Liste tabanlı widgetler için ortak yapı */
.ozd-latest-posts-list,
.ozd-popular-posts-list,
.ozd-most-read-posts-list,
.ozd-related-posts-list,
.ozd-top-rated-posts-list,
.ozd-site-stats-list,
.ozd-tabs-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ----------------------------------------------------------
   Son / Popüler / En Çok Okunan Yazılar Widgetleri
---------------------------------------------------------- */

.ozd-latest-post-item,
.ozd-popular-post-item,
.ozd-most-read-post-item,
.ozd-related-post-item,
.ozd-top-rated-post-item {
    margin: 0 0 0.5rem;
}

.ozd-latest-post-link,
.ozd-popular-post-link,
.ozd-most-read-post-link,
.ozd-related-post-link,
.ozd-top-rated-post-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.ozd-latest-post-link:hover,
.ozd-popular-post-link:hover,
.ozd-most-read-post-link:hover,
.ozd-related-post-link:hover,
.ozd-top-rated-post-link:hover,
.ozd-latest-post-link:focus-visible,
.ozd-popular-post-link:focus-visible,
.ozd-most-read-post-link:focus-visible,
.ozd-related-post-link:focus-visible,
.ozd-top-rated-post-link:focus-visible {
    text-decoration: underline;
}

.ozd-latest-post-title,
.ozd-popular-post-title,
.ozd-most-read-post-title,
.ozd-related-post-title,
.ozd-top-rated-post-title {
    font-weight: 500;
}

/* Yan bilgiler (yorum sayısı, okunma sayısı, tarih vb) */
.ozd-popular-post-comments,
.ozd-most-read-post-views,
.ozd-related-post-date,
.ozd-top-rated-post-rating {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Boş mesajlar */
.ozd-latest-posts-empty,
.ozd-popular-posts-empty,
.ozd-most-read-posts-empty,
.ozd-related-posts-empty,
.ozd-top-rated-posts-empty,
.ozd-site-stats-empty,
.ozd-colored-categories-empty,
.ozd-social-profiles-empty,
.ozd-gallery-empty {
    font-size: 0.8125rem; /* 13px */
    opacity: 0.8;
}

/* ----------------------------------------------------------
   AJAX Arama Widgeti
---------------------------------------------------------- */

.ozd-ajax-search-widget {
    position: relative;
}

.ozd-ajax-search-input-wrap {
    margin-bottom: 6px;
}

.ozd-ajax-search-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ozd-color-border, #ddd);
    border-radius: var(--ozd-radius-md, 4px);
    font-size: 14px;
    outline: none;
    background-color: #fff;
}

.ozd-ajax-search-input:focus-visible {
    border-color: var(--ozd-color-primary, #1f6feb);
    box-shadow: 0 0 0 1px var(--ozd-color-primary-soft, rgba(31,111,235,0.15));
}

/* Sonuç listesi */
.ozd-ajax-search-results-wrap {
    position: relative;
}

.ozd-ajax-search-results-list {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--ozd-color-border-soft, #eee);
    border-radius: var(--ozd-radius-md, 4px);
    background: #fff;
}

.ozd-ajax-search-result-item {
    border-bottom: 1px solid #f3f3f3;
}

.ozd-ajax-search-result-item:last-child {
    border-bottom: none;
}

.ozd-ajax-search-result-link {
    display: block;
    padding: 6px 10px;
    text-decoration: none;
    font-size: 14px;
    color: inherit;
}

.ozd-ajax-search-result-link:hover,
.ozd-ajax-search-result-link:focus-visible {
    background: #f6f6f6;
}

/* Boş/hata mesajı */
.ozd-ajax-search-message {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.9;
}

.ozd-ajax-search-no-results {
    padding: 6px 10px;
    font-size: 13px;
    opacity: 0.8;
}

/* ----------------------------------------------------------
   E-Bülten Widgeti
---------------------------------------------------------- */

.ozd-newsletter-widget {
    font-size: 14px;
}

.ozd-newsletter-desc {
    margin: 0 0 8px;
    font-size: 13px;
}

.ozd-newsletter-input-wrap {
    margin-bottom: 6px;
}

.ozd-newsletter-email-input,
.ozd-newsletter-unsub-email-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ozd-color-border, #ddd);
    border-radius: var(--ozd-radius-md, 4px);
    font-size: 14px;
    outline: none;
    background-color: #fff;
}

.ozd-newsletter-email-input:focus-visible,
.ozd-newsletter-unsub-email-input:focus-visible {
    border-color: var(--ozd-color-primary, #1f6feb);
    box-shadow: 0 0 0 1px var(--ozd-color-primary-soft, rgba(31,111,235,0.15));
}

.ozd-newsletter-next-button,
.ozd-newsletter-confirm-button,
.ozd-newsletter-unsub-button,
.ozd-newsletter-toggle-unsub {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 12px;
    border-radius: var(--ozd-radius-md, 4px);
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Tema ana rengiyle butonlar */
.ozd-newsletter-next-button,
.ozd-newsletter-confirm-button,
.ozd-newsletter-unsub-button {
    background: var(--ozd-color-primary, #333);
    color: #fff;
}

.ozd-newsletter-next-button:hover,
.ozd-newsletter-confirm-button:hover,
.ozd-newsletter-unsub-button:hover,
.ozd-newsletter-next-button:focus-visible,
.ozd-newsletter-confirm-button:focus-visible,
.ozd-newsletter-unsub-button:focus-visible {
    background: var(--ozd-color-primary-dark, #222);
    box-shadow: var(--ozd-shadow-soft, 0 1px 3px rgba(0,0,0,0.15));
}

.ozd-newsletter-toggle-unsub {
    background: #f5f5f5;
    color: #333;
}

.ozd-newsletter-toggle-unsub:hover,
.ozd-newsletter-toggle-unsub:focus-visible {
    background: #e5e5e5;
}

/* KVKK metni */
.ozd-newsletter-kvkk-summary {
    margin: 0 0 8px;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding: 6px 8px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #eee;
}

.ozd-newsletter-consent-wrap {
    margin: 4px 0 8px;
    font-size: 12px;
}

.ozd-newsletter-unsubscribe-wrap {
    margin-top: 10px;
}

.ozd-newsletter-unsub-form {
    margin-top: 6px;
}

/* Mesaj alanı */
.ozd-newsletter-message {
    margin-top: 6px;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 4px;
}

.ozd-newsletter-message.ozd-newsletter-error {
    background: #ffebee;
    color: #b71c1c;
}

.ozd-newsletter-message.ozd-newsletter-success {
    background: #e8f5e9;
    color: #1b5e20;
}

/* ----------------------------------------------------------
   Renkli Kategoriler Widgeti
---------------------------------------------------------- */

.ozd-colored-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* badges stili */
.ozd-colored-categories-badges .ozd-colored-category-item {
    display: inline-block;
    margin: 0 4px 6px 0;
}

.ozd-colored-category-link {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.4;
    background: #f1f1f1;
    color: #333;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ozd-colored-category-link:hover,
.ozd-colored-category-link:focus-visible {
    background: #e0e0e0;
}

.ozd-colored-category-count {
    opacity: 0.85;
}

/* list stili */
.ozd-colored-categories-list.ozd-colored-categories-list .ozd-colored-category-item {
    margin-bottom: 4px;
}

/* cloud stili (temel) */
.ozd-colored-categories-cloud .ozd-colored-category-item {
    display: inline-block;
    margin: 0 4px 6px 0;
}

/* İsteğe göre slug bazlı renkler */
.ozd-colored-category-item.slug-haber .ozd-colored-category-link {
    background: #e53935;
    color: #fff;
}

.ozd-colored-category-item.slug-teknoloji .ozd-colored-category-link {
    background: #1e88e5;
    color: #fff;
}

.ozd-colored-category-item.slug-kultur-sanat .ozd-colored-category-link {
    background: #6a1b9a;
    color: #fff;
}

/* ----------------------------------------------------------
   Sosyal Medya Widgeti
---------------------------------------------------------- */

.widget_ozd_social_profiles {
    font-size: 14px;
}

.ozd-social-profiles-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ozd-social-item {
    display: inline-block;
}

.ozd-social-link {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    background: #f1f1f1;
    color: #333;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ozd-social-link:hover,
.ozd-social-link:focus-visible {
    background: #e0e0e0;
}

/* Her ağ için temel renk örnekleri */

.ozd-social-facebook .ozd-social-link {
    background: #1877f2;
    color: #fff;
}

.ozd-social-x .ozd-social-link {
    background: #000000;
    color: #ffffff;
}

.ozd-social-instagram .ozd-social-link {
    background: #c13584;
    color: #fff;
}

.ozd-social-linkedin .ozd-social-link {
    background: #0a66c2;
    color: #fff;
}

.ozd-social-youtube .ozd-social-link {
    background: #ff0000;
    color: #fff;
}

.ozd-social-whatsapp .ozd-social-link {
    background: #25d366;
    color: #fff;
}

/* ----------------------------------------------------------
   Yazar Kutusu Widgeti
---------------------------------------------------------- */

.widget_ozd_author_box {
    font-size: 14px;
}

.ozd-author-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.ozd-author-avatar img {
    border-radius: 50%;
    display: block;
}

.ozd-author-content {
    flex: 1;
    min-width: 0;
}

.ozd-author-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 2px;
}

.ozd-author-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.ozd-author-bio {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 4px;
}

.ozd-author-bio p {
    margin: 0 0 4px;
}

.ozd-author-website a,
.ozd-author-website-link {
    font-size: 12px;
    text-decoration: underline;
}

.ozd-author-box-empty {
    font-size: 13px;
    opacity: 0.8;
}

.ozd-author-social-links {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.ozd-author-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ozd-author-social i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.ozd-author-social:hover i,
.ozd-author-social:focus-visible i {
    opacity: 1;
}

/* ----------------------------------------------------------
   Galeri Widgeti
---------------------------------------------------------- */

.widget_ozd_gallery {
    font-size: 0; /* grid içinde boşlukları düzeltmek için, item içi font-size ayrı verilecek */
}

.ozd-gallery-grid {
    display: grid;
    gap: 8px;
}

/* Sütun sayısına göre grid */
.ozd-gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ozd-gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ozd-gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ozd-gallery-item {
    position: relative;
    overflow: hidden;
}

.ozd-gallery-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.ozd-gallery-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hover efekti */
.ozd-gallery-link:hover .ozd-gallery-image,
.ozd-gallery-link:focus-visible .ozd-gallery-image {
    transform: scale(1.03);
    opacity: 0.95;
}

/* Başlık */
.ozd-gallery-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 1.4;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    border-radius: 0 0 4px 4px;
}

/* ----------------------------------------------------------
   Site İstatistikleri Widgeti
---------------------------------------------------------- */

.widget_ozd_site_stats {
    font-size: 14px;
}

.ozd-site-stat-item {
    display: flex;
    justify-content: space-between;
    margin: 0 0 4px;
    font-size: 13px;
}

.ozd-site-stat-label {
    opacity: 0.85;
}

.ozd-site-stat-value {
    font-weight: 600;
}

/* ----------------------------------------------------------
   Mini Hakkımda Widgeti
---------------------------------------------------------- */

.widget_ozd_mini_about {
    font-size: 14px;
}

.ozd-mini-about-widget {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ozd-mini-about-avatar img {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.ozd-mini-about-content {
    flex: 1;
    min-width: 0;
}

.ozd-mini-about-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 2px;
}

.ozd-mini-about-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.ozd-mini-about-text {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 6px;
}

.ozd-mini-about-link-wrap {
    margin-top: 2px;
}

.ozd-mini-about-link {
    font-size: 12px;
    text-decoration: underline;
}

/* ----------------------------------------------------------
   Sekmeli Yazılar Widgeti (Son / Popüler / Oylanan)
---------------------------------------------------------- */

.widget_ozd_tabs_posts {
    font-size: 14px;
}

.ozd-tabs-posts-widget {
    border: 1px solid var(--ozd-color-border-soft, #eee);
    border-radius: 4px;
}

/* Sekme başlıkları */
.ozd-tabs-posts-nav {
    display: flex;
    border-bottom: 1px solid var(--ozd-color-border-soft, #eee);
}

.ozd-tabs-posts-nav-item {
    flex: 1;
    padding: 6px 8px;
    border: none;
    background: #f7f7f7;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    outline: none;
}

.ozd-tabs-posts-nav-item + .ozd-tabs-posts-nav-item {
    border-left: 1px solid var(--ozd-color-border-soft, #eee);
}

.ozd-tabs-posts-nav-item.is-active {
    background: #ffffff;
    font-weight: 600;
}

/* Paneller */
.ozd-tabs-posts-panels {
    padding: 8px;
}

.ozd-tabs-posts-panel {
    display: none;
}

.ozd-tabs-posts-panel.is-active {
    display: block;
}

/* Liste içi öğeler */
.ozd-tabs-posts-item {
    margin: 0 0 6px;
}

.ozd-tabs-posts-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.ozd-tabs-posts-link:hover,
.ozd-tabs-posts-link:focus-visible {
    text-decoration: underline;
}

.ozd-tabs-posts-title {
    font-weight: 500;
}

/* Meta bilgiler (tarih, yorum, rating) */
.ozd-tabs-posts-meta {
    display: inline-block;
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.85;
}

.ozd-tabs-posts-date {
    margin-right: 4px;
}

.ozd-tabs-posts-comments,
.ozd-tabs-posts-rating {
    margin-right: 4px;
}

/* Boş panel mesajı */
.ozd-tabs-posts-empty-panel,
.ozd-tabs-posts-empty {
    font-size: 13px;
    opacity: 0.8;
}

/* ----------------------------------------------------------
   Dark Mode için küçük düzeltmeler
---------------------------------------------------------- */

.ozd-dark-mode .ozd-ajax-search-results-list,
.ozd-dark-mode .ozd-newsletter-kvkk-summary,
.ozd-dark-mode .ozd-newsletter-email-input,
.ozd-dark-mode .ozd-newsletter-unsub-email-input {
    background-color: var(--ozd-color-surface);
    border-color: var(--ozd-color-border);
}

.ozd-dark-mode .ozd-newsletter-message.ozd-newsletter-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.ozd-dark-mode .ozd-newsletter-message.ozd-newsletter-success {
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.ozd-dark-mode .ozd-social-link {
    background: #111827;
    color: #e5e7eb;
}

.ozd-dark-mode .ozd-social-link:hover,
.ozd-dark-mode .ozd-social-link:focus-visible {
    background: #1f2937;
}
