/* ─────────────────────────────────────────────
   Agent Access Control — Frontend Styles
   Layout: header (image left + info right) + iframe below
   Style: clean & minimal
───────────────────────────────────────────── */

/* ── Agent page wrapper ── */
.aac-agent-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    font-family: inherit;
}

/* ── Header: image left, title + description right ── */
.aac-agent-header {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 32px;
}

/* Avatar image — small, fixed square */
.aac-agent-avatar {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #ebebeb;
    background: #f5f5f5;
}

.aac-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Info column */
.aac-agent-meta {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.aac-agent-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.aac-agent-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: inherit;
}

.aac-agent-description {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin: 0;
    max-width: 620px;
}

/* ── Badge ── */
.aac-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.aac-badge-public {
    background: #d1fae5;
    color: #065f46;
}

.aac-badge-private {
    background: #dbeafe;
    color: #1e40af;
}

/* ── Divider ── */
.aac-divider {
    border: none;
    border-top: 1px solid #ebebeb;
    margin: 0 0 32px;
}

/* ── Iframe embed ── */
.aac-agent-embed {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    line-height: 0;
}

.aac-agent-embed iframe {
    display: block;
    width: 100%;
    height: 700px;
    border: none;
}

/* ── No embed placeholder ── */
.aac-agent-no-embed {
    padding: 48px 24px;
    text-align: center;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    color: #aaa;
    font-size: 15px;
}

/* ── Agent grid (shortcode [agent_grid]) ── */
.aac-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 8px 0;
}

@media (max-width: 768px) {
    .aac-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 480px) {
    .aac-grid { grid-template-columns: 1fr; }
}

.aac-agent-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.aac-agent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
}

.aac-agent-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.aac-agent-card-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.aac-agent-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aac-agent-card-name {
    font-size: 14px;
    font-weight: 600;
    display: block;
    color: inherit;
}

/* ── Notices ── */
.aac-login-notice,
.aac-empty {
    padding: 24px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    text-align: center;
    color: #888;
    font-size: 15px;
}

/* ── Responsive agent header ── */
@media (max-width: 560px) {
    .aac-agent-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .aac-agent-avatar {
        width: 72px;
        height: 72px;
    }
    .aac-agent-title {
        font-size: 18px;
    }
    .aac-agent-embed iframe {
        height: 500px;
    }
}