/* Uses shared global styles from /css/forms-buttons.css and /css/loaders.css. */

.top5-container {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.top5-container .page-header .breadcrumb-nav {
    margin-bottom: 0.75rem;
}

.top5-your-section {
    margin-top: 2rem;
}

.top5-your-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.top5-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.06);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.top5-summary-card:hover {
    border-color: var(--brand-cool, #1f7a76);
    box-shadow: 0 4px 14px rgba(31, 122, 118, 0.12);
    transform: translateY(-1px);
}

.top5-summary-card--owned {
    text-decoration: none;
}

.top5-summary-card-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.top5-summary-card-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--ink-strong);
}

.top5-summary-card-desc {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-muted);
    line-height: 1.45;
}

.top5-summary-card-byline,
.top5-summary-card-meta {
    margin: 0;
    font-size: 0.88rem;
    color: var(--ink-muted);
}

.top5-summary-card-cta {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-cool, #1f7a76);
}

.top5-summary-card-actions {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.top5-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.top5-badge--draft {
    background: rgba(107, 114, 128, 0.15);
    color: var(--ink-muted);
}

.top5-badge--private {
    background: rgba(31, 122, 118, 0.12);
    color: var(--brand-cool, #1f7a76);
}

.top5-badge--legacy {
    background: rgba(107, 114, 128, 0.15);
    color: var(--ink-muted);
}

.top5-legacy-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-soft);
}

.top5-legacy-heading {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: var(--ink-strong);
}

.top5-legacy-intro {
    margin: 0 0 1.25rem;
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 42rem;
}

.top5-summary-card--legacy .top5-summary-card-link {
    cursor: default;
    text-decoration: none;
}

.top5-delete-confirm-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-strong);
    width: 100%;
}

.top5-community-section {
    margin-bottom: 2.5rem;
}

.top5-community-heading {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: var(--ink-strong);
}

.top5-community-intro {
    margin: 0 0 1.25rem;
    color: var(--ink-muted);
}

.top5-community-loading {
    margin-top: 0.5rem;
}

.top5-community-empty {
    margin: 0;
    padding: 1rem 1.1rem;
    border: 1px dashed var(--border-soft);
    border-radius: 8px;
    color: var(--ink-muted);
    background: rgba(255, 255, 255, 0.65);
}

.top5-community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .top5-community-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1025px) {
    .top5-community-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

.top5-community-card {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 1rem 1.1rem 1.15rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.06);
}

.top5-community-card-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--ink-strong);
}

.top5-community-byline {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.top5-community-byline-muted {
    font-style: italic;
}

.top5-community-profile-link {
    color: var(--brand-cool, #1f7a76);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.top5-community-profile-link:hover {
    color: var(--ink-strong);
}

.top5-community-episodes {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--ink-strong);
    font-size: 0.95rem;
}

.top5-community-episode-link {
    color: var(--brand-cool, #1f7a76);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.top5-community-episode-link:hover {
    color: var(--ink-strong);
}

.top5-manage-heading {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: var(--ink-strong);
}

.top5-sign-in-hint {
    margin-top: 0.5rem;
}

.top5-form-shell {
    margin-top: 0;
}

.top5-selector-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
}

.top5-field {
    margin-bottom: 0;
}

.top5-new-btn {
    white-space: nowrap;
}

.top5-list-block {
    margin-top: 1.5rem;
}

.top5-list-label {
    margin: 0 0 0.65rem;
    font-weight: 600;
    color: var(--ink-strong);
}

.top5-item-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.top5-item-button {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-strong);
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.top5-item-button:hover {
    border-color: var(--brand-cool);
    box-shadow: 0 2px 10px rgba(31, 122, 118, 0.12);
    transform: translateY(-1px);
}

.top5-empty-state {
    padding: 0.9rem 1rem;
    border: 1px dashed var(--border-soft);
    border-radius: 8px;
    color: var(--ink-muted);
    background: rgba(255, 255, 255, 0.65);
}

.top5-selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: #fff;
}

.top5-episode-label {
    color: var(--ink-strong);
    line-height: 1.45;
}

.top5-selected-item .ea-btn-delete {
    flex-shrink: 0;
}

.top5-actions {
    margin-top: 1.5rem;
}

.top5-save-alert {
    margin-top: 1rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .top5-container {
        padding: 1rem;
    }

    .top5-selector-row {
        grid-template-columns: 1fr;
    }

    .top5-new-btn,
    .top5-delete-list,
    .top5-selected-item .ea-btn-delete {
        width: 100%;
    }

    .top5-selected-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
