/* ============================================================
   Polylang Archive Widget — paw-style.css
   ============================================================ */

/* ── Container ── */
.paw-widget {
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #333;
}

.paw-title {
    margin: 0.2rem 0 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #222;
}

/* ── Search bar ── */
.paw-search-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1rem;
    border: 1.5px solid #d0d5dd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s;
}

.paw-search-wrap:focus-within {
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.paw-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.45rem 0.65rem;
    font-size: 0.875rem;
    background: transparent;
    color: #333;
    min-width: 0;
}

.paw-search-input::placeholder {
    color: #aaa;
}

.paw-search-btn,
.paw-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.6rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #777;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.paw-search-btn:hover,
.paw-clear-btn:hover {
    color: #4a90d9;
    background: #f0f6ff;
}

.paw-clear-btn {
    font-size: 0.8rem;
    font-weight: bold;
    color: #bbb;
}

/* ── Loading indicator ── */
.paw-loading {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #888;
    padding: 0.5rem 0;
}

.paw-loading::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top-color: #4a90d9;
    border-radius: 50%;
    animation: paw-spin 0.7s linear infinite;
}

@keyframes paw-spin {
    to { transform: rotate(360deg); }
}

/* ── Year list ── */
.paw-year-list,
.paw-month-list,
.paw-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Year item ── */
.paw-year-item {
    margin-bottom: 2px;
}

.paw-year-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: none;
    background: #FCD6B6;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    transition: background 0.15s, color 0.15s;
}

.paw-year-btn:hover {
    background: #f9c49a;
    color: #7a3800;
}

.paw-year-btn[aria-expanded="true"] {
    background: #f9c49a;
    color: #7a3800;
}

/* ── Month list ── */
.paw-month-list {
    margin-left: 1rem;
    margin-top: 2px;
    padding-left: 0.5rem;
    border-left: 2px solid #E46C0A;
}

.paw-month-item {
    margin-bottom: 2px;
}

.paw-month-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: none;
    background: #FCD6B6;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 500;
    color: #445;
    transition: background 0.15s, color 0.15s;
}

.paw-month-btn:hover {
    background: #f9c49a;
    color: #7a3800;
}

.paw-month-btn[aria-expanded="true"] {
    color: #7a3800;
}

/* ── Chevron ── */
.paw-chevron {
    display: inline-block;
    font-size: 0.55rem;
    transition: transform 0.2s ease;
    color: #E46C0A;
    flex-shrink: 0;
    line-height: 1;
}

[aria-expanded="true"] .paw-chevron {
    transform: rotate(90deg);
}

/* ── Count badge ── */
.paw-count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 400;
    color: #99a;
    flex-shrink: 0;
}

/* ── Post list ── */
.paw-post-list {
    margin-left: 1rem;
    margin-top: 3px;
    padding-left: 0.4rem;
    border-left: 2px dashed #E46C0A;
}

.paw-post-list li {
    margin-bottom: 2px;
    list-style: none !important;
    list-style-type: none !important;
}

.paw-widget ul,
.paw-widget ul li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}

.paw-post-list a {
    display: block;
    padding: 0.28rem 0.45rem;
    font-size: 0.82rem;
    color: #3a6fa8;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.paw-post-list a:hover {
    background: #eef5fb;
    color: #124a8c;
    text-decoration: underline;
}

/* ── No results ── */
.paw-no-results {
    font-size: 0.82rem;
    color: #999;
    font-style: italic;
    padding: 0.5rem 0;
    margin: 0;
}

/* ── Search active indicator ── */
.paw-search-active .paw-year-btn {
    background: #FCD6B6;
}

.paw-search-active .paw-year-btn[aria-expanded="true"] {
    background: #f9c49a;
    color: #7a3800;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .paw-post-list a {
        font-size: 0.8rem;
    }
}
