/* PBN Widgets Pack v3.0 — Apple Design System */

.pbn-widget-container {
    --w-text: #1d1d1f;
    --w-muted: #86868b;
    --w-accent: #0071e3;
    --w-border: #d2d2d7;
    --w-ease: cubic-bezier(0.25, 0.1, 0.25, 1);

    background: #ffffff;
    padding: 24px;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    color: var(--w-text);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Dark mode overrides (optional fallback if needed) */
[data-theme="dark"] .pbn-widget-container.pbn-mode-auto,
.pbn-widget-container.pbn-mode-dark {
    --w-text: #f5f5f7;
    --w-muted: #98989d;
    --w-accent: #2997ff;
    --w-border: rgba(255, 255, 255, 0.1);
    background: rgba(28, 28, 30, 0.5); /* Semi-transparent for better blending */
}

[data-theme="dark"] .pbn-widget-container.pbn-mode-auto {
    background: transparent;
    border: 1px solid var(--w-border);
    box-shadow: none;
}

/* Specific styling for Search Widget to look like a separate card (now inherited from container) */

.pbn-search-container .pbn-widget-title {
    border-bottom: none;
    margin-bottom: 16px;
    padding-bottom: 0;
    color: var(--w-muted);
}

.pbn-widget-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--w-muted);
    margin: 0 0 16px;
    padding: 0 0 12px;
    border: none;
    border-bottom: 1px solid var(--w-border);
    display: block;
}

/* List Items */
.pbn-widget-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pbn-widget-list li {
    margin-bottom: 12px;
}

.pbn-widget-list li:last-child {
    margin-bottom: 0;
}

.pbn-widget-list a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--w-text) !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    transition: color 0.2s var(--w-ease);
}

.pbn-widget-list a:hover {
    color: var(--w-accent) !important;
}

.pbn-count-badge {
    color: var(--w-muted);
    font-size: 13px;
    margin-left: 8px;
}

/* Search */
.pbn-search-form {
    display: flex;
    background: transparent;
    padding: 0;
    border: 1px solid var(--w-border);
    border-radius: 16px;
    position: relative;
    transition: border-color 0.2s var(--w-ease);
}

.pbn-search-form:focus-within {
    border-color: var(--w-accent);
}

.pbn-search-input {
    background: transparent !important;
    border: none !important;
    color: var(--w-text) !important;
    flex: 1;
    padding: 14px 18px !important;
    font-size: 15px;
    font-family: inherit;
    border-radius: 16px 0 0 16px !important;
    box-shadow: none !important;
}

.pbn-search-input:focus {
    outline: none !important;
}

.pbn-search-input::placeholder {
    color: #a1a1a6;
}

.pbn-search-submit {
    background: var(--w-accent) !important;
    border: none !important;
    color: #fff !important;
    width: 58px !important;
    height: calc(100% - 10px) !important;
    margin: 5px 5px 5px 0 !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: opacity 0.2s var(--w-ease), transform 0.1s var(--w-ease);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 0;
}

.pbn-search-submit:hover {
    opacity: 0.9;
    transform: scale(0.96);
}

/* Tag Cloud & Dynamic Links Bubble Style */
.pbn-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px; /* Space for scrollbar */
}

/* Custom Scrollbar for Tag Cloud */
.pbn-tag-cloud::-webkit-scrollbar {
    width: 4px;
}
.pbn-tag-cloud::-webkit-scrollbar-track {
    background: transparent;
}
.pbn-tag-cloud::-webkit-scrollbar-thumb {
    background: var(--w-border);
    border-radius: 4px;
}
.pbn-tag-cloud::-webkit-scrollbar-thumb:hover {
    background: var(--w-muted);
}

.pbn-tag-cloud a, .pbn-tag-link {
    color: var(--w-accent) !important;
    font-size: 14.5px !important;
    text-decoration: none !important;
    background: transparent;
    border: none;
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.2s var(--w-ease) !important;
}

.pbn-tag-cloud a:hover, .pbn-tag-link:hover {
    text-decoration: none !important;
    background: var(--w-accent) !important;
    color: #ffffff !important;
}

/* Recent Posts */
.pbn-post-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pbn-post-title {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
}

.pbn-post-date {
    display: none; /* Hidden based on image */
}

/* Remove item icons completely for this style */
.pbn-item-icon {
    display: none !important;
}

/* Archives list styling */
.pbn-archive-list li {
    margin-bottom: 12px;
}

.pbn-archive-list li a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    color: var(--w-text) !important;
    text-decoration: none !important;
    font-size: 15px;
    transition: color 0.2s var(--w-ease);
}

.pbn-archive-list li a:hover {
    color: var(--w-accent) !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pbn-widget-container,
    .pbn-widget-list a,
    .pbn-tag-cloud a {
        transition: none !important;
    }
}
