/* ── Pretre Search shortcode styles ── */

.pretre-search {
    position: relative;
}

.pretre-search label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.pretre-search input[type="search"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
    box-sizing: border-box;
}

/* ── Alphabet bar ── */
.pretre-alphabet {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pretre-alphabet-letter {
    border: 1px solid #ddd;
    background: #fff;
    padding: 4px 9px;
    cursor: pointer;
    border-radius: 3px;
    font-weight: 600;
    font-size: .9em;
    line-height: 1.4;
}

.pretre-alphabet-letter:hover {
    background: #f7f7fa;
    border-color: #aaa;
}

.pretre-alphabet-letter.active {
    background: var(--wp--preset--color--marron-f);
    color: #fff;
    border-color: var(--wp--preset--color--marron-f);
}

/* ── Letter list ── */
.pretre-list {
    margin-top: 12px;
}

.pretre-list-meta {
    margin-bottom: 10px;
    color: #444;
}

.pretre-list-ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 5px 0;
}

.pretre-list-ul li {
    padding: 2px 4px;
    border-bottom: 1px solid #aaa;
}

.pretre-list-ul li a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
}

.pretre-item-name {
    font-size: 1em;
    white-space: normal;
}

.pretre-item-life {
    display: block;
    margin-top: 2px;
    font-size: 0.9em;
    color: #666;
    white-space: normal;
}

.pretre-list-ul li a:hover {
    text-decoration: underline;
}

.pretre-list-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.pretre-page-button {
    border: 1px solid #ddd;
    background: #fff;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 3px;
    font-weight: 600;
}

.pretre-page-button:hover:not(:disabled) {
    background: #f7f7fa;
    border-color: #aaa;
}

.pretre-page-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.pretre-page-status {
    font-weight: 600;
}

/* ── Autocomplete dropdown ── */
.pretre-suggestions {
    border: 1px solid #ddd;
    background: #fff;
    max-height: 240px;
    overflow: auto;
    position: absolute;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.pretre-suggestion {
    padding: 8px 10px;
    cursor: pointer;
}

.pretre-suggestion-name {
    font-size: 1em;
}

.pretre-suggestion-life {
    display: block;
    margin-top: 2px;
    font-size: 0.9em;
    color: #666;
}

.pretre-suggestion.active,
.pretre-suggestion:hover {
    background: #f0f0f8;
}


.pretre-list {
    margin-top: 10px;
    font-size: var(--wp--preset--font-size--medium);
}