/*
 * The app directory's detail page (/apps/{slug}). The listing reuses the gallery's cards
 * (gallery.css, .gx-*); only what the gallery has no equivalent for lives here.
 */

.apx { max-width: 760px; }

.apx-crumb { font-size: .9rem; margin: 0 0 1rem; }

.apx-open {
    display: inline-block;
    margin: 1.25rem 0 .5rem;
    padding: .7rem 1.2rem;
    border-radius: 8px;
    background: #4f46e5;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.apx-open:hover,
.apx-open:focus-visible { background: #4338ca; color: #fff; }

.apx-url { font-size: .85rem; opacity: .75; word-break: break-all; }

.apx-desc { white-space: pre-line; line-height: 1.6; margin-top: 1.5rem; }

.apx-note { font-size: .8rem; opacity: .7; margin-top: 2.5rem; }

/*
 * The owner's side of the directory (/apps/publish). Plain forms, deliberately: this is a page
 * somebody opens twice in an app's life, and every pixel of it is a field or the state of a
 * submission.
 */

.apub { max-width: 760px; }

.apub-notice {
    margin: 0 0 1.5rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    background: rgba(79, 70, 229, .08);
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .25);
    font-size: .9rem;
}

.apub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }

.apub-row {
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12);
}

.apub-row.is-open { box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .45); }

.apub-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.apub-name { font-size: 1.05rem; margin: 0; }

.apub-url { font-size: .82rem; opacity: .7; margin: .2rem 0 0; word-break: break-all; }

.apub-state {
    flex: none;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(100, 116, 139, .14);
}

.apub-state--pending { background: rgba(217, 119, 6, .16); color: #b45309; }
.apub-state--listed { background: rgba(5, 150, 105, .16); color: #047857; }
.apub-state--removed { background: rgba(220, 38, 38, .14); color: #b91c1c; }

.apub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .9rem; }

.apub-inline { display: inline; margin: 0; }

.apub-btn {
    display: inline-block;
    padding: .45rem .9rem;
    border: 0;
    border-radius: 8px;
    background: rgba(79, 70, 229, .1);
    color: #4338ca;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.apub-btn:hover, .apub-btn:focus-visible { background: rgba(79, 70, 229, .18); color: #3730a3; }

.apub-btn--primary { background: #4f46e5; color: #fff; }
.apub-btn--primary:hover, .apub-btn--primary:focus-visible { background: #4338ca; color: #fff; }

.apub-btn--quiet { background: transparent; color: #475569; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .14); }
.apub-btn--quiet:hover, .apub-btn--quiet:focus-visible { background: rgba(15, 23, 42, .05); color: #1e293b; }

.apub-blocked, .apub-hint { font-size: .84rem; opacity: .75; margin: .8rem 0 0; }

.apub-error {
    margin: 0 0 1rem;
    padding: .7rem .9rem;
    border-radius: 8px;
    background: rgba(220, 38, 38, .1);
    color: #b91c1c;
    font-size: .88rem;
}

.apub-form { margin-top: 1.1rem; display: grid; gap: 1.1rem; }

.apub-field { display: grid; gap: .35rem; }

.apub-label { font-size: .85rem; font-weight: 600; }

.apub-optional { font-weight: 400; opacity: .6; }

.apub-input {
    width: 100%;
    padding: .55rem .7rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, .18);
    background: #fff;
    font: inherit;
    font-size: .95rem;
}

.apub-input:focus-visible { outline: 2px solid rgba(79, 70, 229, .5); outline-offset: 1px; }

.apub-textarea { resize: vertical; line-height: 1.55; }

.apub-help { font-size: .8rem; opacity: .7; }

@media (max-width: 520px) {
    .apub-row-head { flex-direction: column; }
}

/* The way in, at the foot of /apps: quiet, but the only door there is. */
.gx-foot-cta {
    margin: 3rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(15, 23, 42, .1);
    font-size: .9rem;
    opacity: .85;
}
