/* Frontend styles for Persigned Templates grid + detail */

.ps-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.ps-template-card {
    border-radius: 1rem;
    padding: 1rem;
    background: radial-gradient(circle at 0 0, rgba(0,210,210,0.13), #020617);
    border: 1px solid rgba(30,64,175,0.7);
    box-shadow: 0 18px 44px rgba(2,6,23,0.85);
    color: #e5e7eb;
    font-size: 0.85rem;
}

.ps-template-kicker {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.ps-template-title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 600;
}

.ps-template-excerpt {
    margin: 0 0 0.8rem;
    color: #9ca3af;
}

/* Details block = Template Detail View */
.ps-template-detail {
    margin: 0 0 0.7rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(30,64,175,0.7);
    background: rgba(15,23,42,0.7);
    padding: 0.45rem 0.75rem;
}

.ps-template-detail > summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.78rem;
    color: #cbd5f5;
}

.ps-template-detail > summary::-webkit-details-marker {
    display: none;
}

.ps-template-detail > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 0.3rem;
    font-size: 0.7rem;
    transform: translateY(-1px);
}

.ps-template-detail[open] > summary::before {
    content: "▾";
}

.ps-template-detail-inner {
    margin-top: 0.5rem;
    border-top: 1px solid rgba(30,64,175,0.7);
    padding-top: 0.5rem;
}

.ps-template-detail-body {
    margin: 0 0 0.7rem;
    max-height: 260px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.72rem;
    white-space: pre-wrap;
    background: rgba(15,23,42,0.8);
    padding: 0.55rem;
    border-radius: 0.6rem;
}

.ps-template-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ps-template-btn-primary,
.ps-template-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-decoration: none;
}

.ps-template-btn-primary {
    background: radial-gradient(circle at 10% 0, #7cf8ff 0, #3bdeb9 40%, #00d2d2 100%);
    color: #02101a;
    box-shadow: 0 10px 26px rgba(0,210,210,0.6);
}

.ps-template-btn-secondary {
    border: 1px solid rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.95);
    color: #e5e7eb;
}

.ps-template-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
}

.ps-template-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.6);
}

.ps-template-link {
    color: #7cf8ff;
    text-decoration: none;
}

.ps-template-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .ps-template-detail-body {
        max-height: 220px;
    }
}
