/**
 * Partner Portal styles.
 * Standalone branded surface where a content partner (e.g.
 * KnownUnknown) manages their spotlight feed. The --pp-accent custom
 * property is set from the partner's branding at runtime.
 */

:root {
    --pp-accent: #6a00ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    color: #15161c;
    background: #f6f5fb;
}

.pp-root {
    min-height: 100vh;
}

.pp-loading,
.pp-message {
    display: flex;
    min-height: 60vh;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 15px;
    text-align: center;
    padding: 0 24px;
}

.pp-message-card {
    max-width: 420px;
    background: #fff;
    border: 1px solid #ececf3;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 8px 30px rgb(20 16 40 / 6%);
}

.pp-message-card h1 {
    font-size: 18px;
    margin: 0 0 8px;
}

.pp-message-card p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 18px;
}

.pp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 10px;
    background: var(--pp-accent);
    color: #fff;
    font:
        600 14px Inter,
        sans-serif;
    padding: 11px 18px;
    cursor: pointer;
    text-decoration: none;
    transition:
        filter 0.15s ease,
        transform 0.15s ease;
}

.pp-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.pp-btn--ghost {
    background: transparent;
    color: #374151;
    border: 1px solid #d8d9e3;
}

.pp-btn--danger {
    background: transparent;
    color: #dc2626;
    border: 1px solid rgb(220 38 38 / 40%);
}

/* ── Header ── */
.pp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: #fff;
    border-bottom: 1px solid #ececf3;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pp-brand-logo {
    height: 28px;
    width: auto;
    display: block;
}

.pp-brand-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--pp-accent);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-brand-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.pp-brand-sub {
    font-size: 12px;
    color: #9ca3af;
}

.pp-header-spacer {
    flex: 1;
}

.pp-header-user {
    font-size: 12.5px;
    color: #6b7280;
    margin-right: 4px;
}

/* ── Layout ── */
.pp-main {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px;
}

.pp-section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin: 4px 0 14px;
}

/* ── Form ── */
.pp-form {
    background: #fff;
    border: 1px solid #ececf3;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 28px;
    box-shadow: 0 8px 30px rgb(20 16 40 / 5%);
}

.pp-form-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
}

@media (width <= 600px) {
    .pp-form-grid {
        grid-template-columns: 1fr;
    }
}

.pp-drop {
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    border: 1.5px dashed #d2d3df;
    background: #faf9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    color: #9ca3af;
    font-size: 12.5px;
    text-align: center;
    padding: 10px;
    position: relative;
}

.pp-drop img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pp-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pp-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 5px;
}

.pp-field input[type='text'],
.pp-field input[type='url'],
.pp-field input[type='datetime-local'],
.pp-field textarea {
    width: 100%;
    border: 1px solid #d8d9e3;
    border-radius: 9px;
    padding: 9px 11px;
    font:
        400 14px Inter,
        sans-serif;
    color: #15161c;
    background: #fff;
}

.pp-field input:focus,
.pp-field textarea:focus {
    outline: none;
    border-color: var(--pp-accent);
    box-shadow: 0 0 0 3px rgb(106 0 255 / 12%);
}

.pp-field textarea {
    resize: vertical;
    min-height: 56px;
}

.pp-row {
    display: flex;
    gap: 12px;
}

.pp-row > .pp-field {
    flex: 1;
}

.pp-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}

.pp-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.pp-form-error {
    color: #dc2626;
    font-size: 12.5px;
    margin-right: auto;
    align-self: center;
}

/* ── Items list ── */
.pp-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.pp-item {
    background: #fff;
    border: 1px solid #ececf3;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pp-item-art {
    aspect-ratio: 4 / 5;
    width: 100%;
    object-fit: cover;
    display: block;
    background: #f0eef9;
}

.pp-item-body {
    padding: 11px 12px 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pp-item-handle {
    font-size: 13px;
    font-weight: 600;
}

.pp-item-status {
    display: inline-flex;
    align-self: flex-start;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 999px;
}

.pp-status-live {
    background: rgb(16 185 129 / 12%);
    color: #059669;
}

.pp-status-scheduled {
    background: rgb(245 158 11 / 14%);
    color: #b45309;
}

.pp-status-expired,
.pp-status-inactive {
    background: rgb(107 114 128 / 14%);
    color: #4b5563;
}

.pp-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.pp-item-actions .pp-btn {
    flex: 1;
    padding: 7px 10px;
    font-size: 12.5px;
}

.pp-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 40px 0;
}
