/* ============================================================
   Post Type Ownership — Shared Styles (admin + frontend)
   ============================================================ */

/* ---- Admin: ownership meta box ---- */
.po-meta-box label {
    font-weight: 600;
}

.po-meta-box select.widefat {
    margin-top: 4px;
    max-width: 100%;
    box-sizing: border-box;
}

.po-meta-box hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 12px 0;
}

.po-claim-date {
    color: #888;
    font-size: 12px;
    margin-top: -6px;
}

.po-revoke-btn {
    color: #b32d2e !important;
    border-color: #b32d2e !important;
}

.po-approve-btn {
    background: #00a32a !important;
    border-color: #00a32a !important;
    color: #fff !important;
}

.po-deny-btn {
    color: #b32d2e !important;
}

/* ---- Admin: claims list table ---- */
.po-claims-wrap h2 {
    margin-top: 1.5em;
}

.po-claims-table th {
    font-weight: 600;
}

.po-conflict-panel {
    padding: 16px 20px;
    margin: 20px 0;
    border-left-width: 4px;
}

.po-conflict-panel h2 {
    margin-top: 0.5em;
}

/* ---- Frontend: owned items list ---- */
.po-owned-items {
    margin: 24px 0;
}

.po-owned-group {
    margin-bottom: 20px;
}

.po-owned-group__title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
}

.po-owned-list {
    list-style: disc;
    margin: 0 0 0 20px;
    padding: 0;
}

.po-owned-item {
    margin-bottom: 4px;
}

.po-owned-empty {
    color: #888;
}

/* ---- Frontend: claim UI ---- */
.po-ownership-ui {
    margin: 24px 0;
}

.po-claim-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 18px 22px;
    display: inline-block;
}

.po-claim-box--inline {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
}

.po-claim-box--taxonomy {
    background: #f0f4ff;
    border-color: #c2cfff;
    margin-top: 12px;
}

.po-claim-label {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1a2332;
}

.po-claim-box--inline .po-claim-label {
    margin: 0;
    white-space: nowrap;
}

.po-claim-box--inline form {
    margin: 0;
    flex-shrink: 0;
}

.po-claim-btn {
    background: #0073aa;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    padding: 8px 18px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.po-claim-btn:hover {
    background: #005a87;
    color: #fff;
}

.po-claim-btn--taxonomy {
    background: #3858e9;
}

.po-claim-btn--taxonomy:hover {
    background: #2645d5;
}

.po-claim-pending {
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 8px 14px;
    display: inline-block;
}

.po-login-prompt {
    color: #555;
}

/* ---- Mobile: stack inline claim box vertically ---- */
@media (max-width: 600px) {
    .po-claim-box--inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .po-claim-box--inline .po-claim-label {
        white-space: normal;
    }
}

/* ---- Taxonomy Manager: summary cards ---- */
.po-summary-cards {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.po-summary-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 16px 20px;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.po-summary-card--green {
    border-color: #00a32a;
    background: #f0fdf4;
}

.po-summary-card--orange {
    border-color: #dba617;
    background: #fef8ee;
}

.po-summary-card__number {
    font-size: 2em;
    font-weight: 700;
    line-height: 1.1;
    color: #1d2327;
}

.po-summary-card__label {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
}

/* ---- Taxonomy Manager: filter bar ---- */
.po-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 3px;
}

/* ---- Taxonomy Manager: filter bar separator ---- */
.po-filter-sep {
    flex: 1;
}

/* ---- Taxonomy Manager: bulk action bar ---- */
.po-bulk-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.po-bulk-label {
    font-weight: 500;
    white-space: nowrap;
}

/* ---- Taxonomy Manager: table ---- */
.po-tax-manager-table .po-col-taxonomy {
    width: 14%;
}

.po-tax-manager-table .po-col-term {
    width: 22%;
}

.po-tax-manager-table .po-col-owner {
    width: 18%;
}

.po-tax-manager-table .po-col-num {
    text-align: center;
    width: 90px;
}

.po-tax-manager-table .po-col-actions {
    width: 280px;
}

.po-unowned-count {
    color: #b32d2e;
    font-weight: 600;
}

.po-unowned-label {
    color: #8c8f94;
}

.po-actions-cell {
    white-space: nowrap;
}

.po-inline-reassign {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.po-inline-reassign select {
    max-width: 160px;
}

.po-revoke-link {
    display: inline-block;
    margin-left: 8px;
    color: #b32d2e !important;
    text-decoration: none;
    font-size: 13px;
    vertical-align: middle;
}

.po-revoke-link:hover {
    color: #8b1a1b !important;
    text-decoration: underline;
}

/* ---- Monetization: tier badges and upgrade / manage-subscription links ---- */
.po-tier-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.po-tier-badge--upgraded {
    background: #f0fdf4;
    border: 1px solid #00a32a;
    color: #0a4a1a;
}

.po-upgrade-btn {
    display: inline-block;
    background: #f0a500;
    border: none;
    border-radius: 4px;
    color: #fff !important;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    text-decoration: none;
    transition: background 0.2s ease;
    vertical-align: middle;
}

.po-upgrade-btn:hover {
    background: #d08800;
    color: #fff !important;
}

.po-manage-sub-link {
    font-size: 12px;
    color: #646970;
    vertical-align: middle;
}

.po-manage-sub-link:hover {
    color: #1d2327;
}

/* Dashboard tier section */
.po-dashboard-tier {
    margin-bottom: 1.5rem;
}

.po-dashboard-tier .po-edit-form__label {
    margin-bottom: 0.5rem;
}

/* ---- AnalyticsWP integration: inline stats in owned-items list ---- */
.po-item-stats {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.po-item-stats__period {
    color: #aaa;
}

/* ---- AnalyticsWP integration: stats panel (admin meta box + edit form) ---- */
.po-stats-panel {
    margin-top: 4px;
}

.po-stats-panel__heading {
    font-size: 12px;
    color: #888;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.po-stats-panel__row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f0;
}

.po-stats-panel__row:last-child {
    border-bottom: none;
}

.po-stats-panel--frontend {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
