/* AMB Nostr — Default Styles */

.amb-nostr-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
    align-items: stretch;
}

.amb-nostr-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1.25rem;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.amb-nostr-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.amb-nostr-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.amb-nostr-card__title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.amb-nostr-card__title a {
    text-decoration: none;
    color: inherit;
}

.amb-nostr-card__title a:hover {
    text-decoration: underline;
}

.amb-nostr-card__description {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #444;
}

.amb-nostr-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.amb-nostr-card__keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.amb-nostr-card__footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #777;
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
    margin-top: auto;
}

.amb-nostr-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    background: #f0f0f0;
    color: #444;
}

.amb-nostr-tag--type {
    background: #e8f0fe;
    color: #1a56db;
}

.amb-nostr-tag--level {
    background: #fef3e0;
    color: #b45309;
}

.amb-nostr-tag--more {
    opacity: .7;
}

.amb-nostr-meta {
    color: #666;
}

.amb-nostr-meta--license a {
    color: #666;
    text-decoration: none;
}

.amb-nostr-meta--license a:hover {
    text-decoration: underline;
}

/* List style */

.amb-nostr-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.amb-nostr-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.amb-nostr-list__item:last-child {
    border-bottom: none;
}

.amb-nostr-list__title {
    font-weight: 600;
}

.amb-nostr-list__title a {
    text-decoration: none;
    color: inherit;
}

.amb-nostr-list__title a:hover {
    text-decoration: underline;
}

.amb-nostr-empty {
    color: #888;
    font-style: italic;
    margin: 1.5rem 0;
}

/* Search form */

.amb-nostr-search-form {
    margin: 1.5rem 0;
}

.amb-nostr-search-form__row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.amb-nostr-search-form__input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.amb-nostr-search-form__input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.amb-nostr-search-form__submit {
    padding: 0.5rem 1.25rem;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.amb-nostr-search-form__submit:hover {
    background: #135e96;
}

.amb-nostr-search-form__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.amb-nostr-search-form__select {
    padding: 0.4rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
    min-width: 180px;
}

.amb-nostr-search-results {
    min-height: 2rem;
}

.amb-nostr-search-results--loading {
    opacity: 0.5;
    pointer-events: none;
}

.amb-nostr-search-results--loading::before {
    content: '';
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    margin: 2rem auto;
    border: 3px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: amb-nostr-spin 0.6s linear infinite;
}

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

/* ---- resource detail ---- */
.amb-nostr-resource { max-width: 56rem; margin: 0 auto; padding: 1rem; }
.amb-nostr-resource section { margin-bottom: 2rem; }

.amb-nostr-card__open { display: inline-block; padding: 0.3rem 0.7rem; font-size: 0.85rem; background: #2a5d5d; color: #fff; border-radius: 4px; text-decoration: none; }

/* Hero: kicker badge + title + optional cover image beside the key facts. */
.amb-nostr-resource__kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    margin-bottom: 0.6rem;
    border-radius: 999px;
    background: #2a5d5d;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.amb-nostr-resource__title { font-size: 2rem; line-height: 1.15; margin: 0 0 1rem; }
.amb-nostr-resource__hero-grid {
    display: grid;
    grid-template-columns: minmax(140px, 240px) 1fr;
    gap: 1.5rem;
    align-items: start;
}
.amb-nostr-resource__hero-grid--no-image { grid-template-columns: 1fr; }
@media (max-width: 640px) {
    .amb-nostr-resource__hero-grid { grid-template-columns: 1fr; }
}
.amb-nostr-resource__image img { width: 100%; height: auto; border-radius: 8px; display: block; }

.amb-nostr-resource__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.amb-nostr-resource__facts li { display: flex; flex-direction: column; min-width: 8rem; }
.amb-nostr-resource__facts .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.65; margin-bottom: 0.15rem; }
.amb-nostr-resource__facts .val { font-weight: 600; font-size: 1.05rem; }

/* Access band. */
.amb-nostr-resource__band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    background: #eef5f4;
    border-radius: 12px;
    padding: 1.5rem;
}
.amb-nostr-resource__band h2 { margin: 0 0 0.35rem; font-size: 1.2rem; }
.amb-nostr-resource__band p { margin: 0 0 0.5rem; opacity: 0.85; }
.amb-nostr-resource__band code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: break-word;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}
.amb-nostr-resource__open-button {
    display: inline-block;
    flex-shrink: 0;
    padding: 0.7rem 1.4rem;
    background: #2a5d5d;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}
.amb-nostr-resource__open-button:hover { background: #204848; }

.amb-nostr-resource__description { font-size: 1rem; line-height: 1.65; }

/* Bildungsdetails card. */
.amb-nostr-resource__details {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
}
.amb-nostr-resource__details h2 { margin: 0 0 1rem; font-size: 1.3rem; }
.amb-nostr-resource__details-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) {
    .amb-nostr-resource__details-grid { grid-template-columns: 1fr 1fr; }
}
.amb-nostr-resource__details-grid li { display: flex; flex-direction: column; }
.amb-nostr-resource__details-grid .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.65; margin-bottom: 0.15rem; }
.amb-nostr-resource__details-grid .val { font-weight: 600; }

/* Topics + license. */
.amb-nostr-resource__tags-license { display: flex; flex-direction: column; gap: 1.25rem; }
.amb-nostr-resource__topics h3 { margin: 0 0 0.6rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.amb-nostr-resource__keywords { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.amb-nostr-resource__license {
    background: linear-gradient(180deg, #fafafa, #eef5f4);
    border: 1px solid #cfe3e0;
    border-radius: 12px;
    padding: 1.5rem;
}
.amb-nostr-resource__license-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.6rem;
    border-radius: 999px;
    background: #2a5d5d;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}
.amb-nostr-resource__license h3 { margin: 0 0 0.4rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.amb-nostr-resource__license-link { color: #2a5d5d; font-weight: 600; text-decoration: none; }
.amb-nostr-resource__license-link:hover { text-decoration: underline; }
.amb-nostr-resource__citation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #cfe3e0;
}
.amb-nostr-resource__citation h4 { margin: 0 0 0.4rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.amb-nostr-resource__citation p { margin: 0 0 0.3rem; font-size: 0.9rem; }
.amb-nostr-resource__citation-hint { font-size: 0.78rem; opacity: 0.65; }

/* Contributors: creators + "indexed by", one wrapping row of columns. */
.amb-nostr-resource__contributors { display: flex; flex-wrap: wrap; gap: 1rem 3rem; }
.amb-nostr-resource__contrib-col h3 { margin: 0 0 0.75rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.amb-nostr-resource__contrib-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.amb-nostr-resource__contrib { display: flex; align-items: center; gap: 0.5rem; }
.amb-nostr-resource__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.amb-nostr-resource__avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2a5d5d;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.amb-nostr-resource__back { margin-top: 2rem; }
.amb-nostr-error { padding: 1rem; background: #fdecea; color: #7a1f1f; border-radius: 6px; }

/* ---- source hint ---- */
.wp-nostr-hint { position: relative; font-size: .8rem; margin: .5rem 0; }
.wp-nostr-hint summary { cursor: pointer; display: inline-block; padding: .15rem .6rem; border: 1px solid #ccc; border-radius: 999px; }
.wp-nostr-hint[open] dl { position: absolute; z-index: 20; background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: .75rem 1rem; min-width: 18rem; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.wp-nostr-hint dt { font-weight: 600; margin-top: .4rem }
.wp-nostr-hint dd { margin: 0; word-break: break-all }
.wp-nostr-hint[open] dl { max-width: calc(100vw - 2rem); }
.wp-nostr-hint dt, .wp-nostr-hint dd { border: 0; background: none; padding: 0; text-transform: none; }
.wp-nostr-hint dt::before, .wp-nostr-hint dt::after { content: none; }
