/* ═══════════════════════════════════════════════════════
   Memory Perspectives — mp-* prefix
   ═══════════════════════════════════════════════════════ */

/* ── Section container ── */
.mp-section {
    border-top: 1px solid #dedede;
    padding: 20px 0 8px;
    margin-top: 16px;
}

.mp-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.mp-header-icon {
    font-size: 22px;
    color: #EA794C;
    margin-right: 8px;
}

.mp-header-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.mp-manage-btn {
    background: none;
    border: 1px solid #dedede;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #757575;
    transition: all 0.2s;
}

.mp-manage-btn:hover {
    color: #EA794C;
    border-color: #EA794C;
}

/* ── Perspective block ── */
.mp-block {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}

.mp-author-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.mp-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.mp-avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.mp-author-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mp-author-name {
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mp-author-date {
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 12px;
    color: #757575;
}

.mp-actions {
    display: flex;
    gap: 4px;
}

.mp-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #757575;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mp-action-btn:hover {
    color: #EA794C;
    background: rgba(234, 121, 76, 0.1);
}

.mp-action-danger:hover {
    color: #df361f;
    background: rgba(223, 54, 31, 0.1);
}

.mp-action-btn .material-icons-outlined {
    font-size: 18px;
}

/* ── Content + Images ── */
.mp-content {
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #333;
    margin-bottom: 8px;
}

.mp-image-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.mp-image-strip::-webkit-scrollbar {
    height: 4px;
}

.mp-image-strip::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.mp-image-thumb {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.mp-image-thumb:hover {
    opacity: 0.85;
}

/* ── Empty state ── */
.mp-empty {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 14px;
    font-family: 'SFPROTEXT', sans-serif;
}

/* ── CTA button ── */
.mp-cta {
    text-align: center;
    padding: 8px 0;
}

.mp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 2px solid #EA794C;
    border-radius: 500px;
    background: transparent;
    color: #EA794C;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mp-cta-btn:hover {
    background: #EA794C;
    color: white;
}

.mp-cta-btn .material-icons-outlined {
    font-size: 18px;
}

/* ── Inline editor ── */
.mp-editor {
    background: #fafafa;
    border: 1px solid #dedede;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.mp-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mp-editor-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mp-editor-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #757575;
    padding: 2px;
}

.mp-editor-textarea {
    width: 100%;
    border: 1px solid #dedede;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
    line-height: 20px;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.mp-editor-textarea:focus {
    outline: none;
    border-color: #EA794C;
}

.mp-editor-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.mp-editor-image-preview {
    position: relative;
    width: 56px;
    height: 56px;
}

.mp-editor-image-thumb {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
}

.mp-editor-image-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #df361f;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mp-editor-image-remove .material-icons-outlined {
    font-size: 12px;
}

.mp-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.mp-editor-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #757575;
    font-size: 13px;
    font-family: 'SFPROTEXT', sans-serif;
    transition: color 0.2s;
}

.mp-editor-upload-btn:hover {
    color: #EA794C;
}

.mp-editor-upload-btn .material-icons-outlined {
    font-size: 20px;
}

.mp-editor-submit-group {
    display: flex;
    gap: 8px;
}

.mp-editor-cancel {
    padding: 6px 16px;
    border: 1px solid #dedede;
    border-radius: 6px;
    background: white;
    color: #757575;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 13px;
    cursor: pointer;
}

.mp-editor-submit {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    background: #EA794C;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.mp-editor-submit:hover {
    background: #f37442;
}

/* ── Invite modal ── */
.mp-invite-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-invite-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.mp-invite-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 420px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.mp-invite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.mp-invite-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mp-invite-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #757575;
}

.mp-invite-body {
    padding: 16px 20px;
}

.mp-invite-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.mp-invite-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dedede;
    border-radius: 6px;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
}

.mp-invite-input:focus {
    outline: none;
    border-color: #EA794C;
}

.mp-invite-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 6px;
    background: #EA794C;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mp-invite-send-btn:hover {
    background: #f37442;
}

.mp-invite-send-btn .material-icons-outlined {
    font-size: 20px;
}

.mp-invite-error {
    color: #df361f;
    font-size: 13px;
    font-family: 'SFPROTEXT', sans-serif;
    margin-bottom: 8px;
}

.mp-invite-list {
    max-height: 200px;
    overflow-y: auto;
}

.mp-invite-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.mp-invite-name {
    flex: 1;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
    color: #333;
}

.mp-invite-status {
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 8px;
}

.mp-invite-status--pending {
    background: #FFF3E0;
    color: #E65100;
}

.mp-invite-status--accepted {
    background: #E8F5E9;
    color: #2E7D32;
}

.mp-invite-status--declined {
    background: #FFEBEE;
    color: #C62828;
}

.mp-invite-revoke {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 2px;
    transition: color 0.2s;
}

.mp-invite-revoke:hover {
    color: #df361f;
}

.mp-invite-revoke .material-icons-outlined {
    font-size: 16px;
}

.mp-invite-divider {
    height: 1px;
    background: #eee;
    margin: 12px 0;
}

.mp-invite-link-section {
    margin-top: 8px;
}

.mp-invite-link-toggle {
    margin-bottom: 8px;
}

.mp-toggle-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.mp-toggle-label input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #EA794C;
}

.mp-toggle-text {
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 13px;
    color: #555;
    line-height: 18px;
}

.mp-invite-link-row {
    display: flex;
    gap: 8px;
}

.mp-invite-link-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #dedede;
    border-radius: 6px;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 12px;
    color: #555;
    background: #f9f9f9;
}

.mp-invite-copy-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dedede;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #757575;
    transition: all 0.2s;
}

.mp-invite-copy-btn:hover {
    color: #EA794C;
    border-color: #EA794C;
}

.mp-invite-copy-btn .material-icons-outlined {
    font-size: 16px;
}

/* ── Post-publish invite card ── */
.mp-post-publish {
    text-align: center;
    padding: 20px;
}

.mp-post-publish-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    margin: 0 auto;
}

.mp-post-publish-icon .material-icons-outlined {
    font-size: 48px;
    color: #EA794C;
}

.mp-post-publish-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 12px 0 8px;
}

.mp-post-publish-desc {
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
    color: #757575;
    margin-bottom: 16px;
}

.mp-post-publish-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.mp-post-publish-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.mp-post-publish-skip {
    padding: 8px 24px;
    border: 1px solid #dedede;
    border-radius: 6px;
    background: white;
    color: #757575;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
    cursor: pointer;
}

.mp-post-publish-done {
    padding: 8px 24px;
    border: none;
    border-radius: 6px;
    background: #EA794C;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ── Invite landing banner ── */
.mp-invite-landing {
    background: #D3E4F5;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mp-invite-landing-icon .material-icons-outlined {
    font-size: 28px;
    color: #1565C0;
}

.mp-invite-landing-text {
    flex: 1;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
    color: #333;
}

/* ── Manage panel ── */
.mp-manage-panel {
    background: white;
    border: 1px solid #dedede;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.mp-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mp-manage-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mp-manage-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #757575;
}

.mp-manage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.mp-manage-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 14px;
    color: #333;
}

.mp-manage-empty {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 12px;
}

/* ── Image lightbox ── */
.mp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mp-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* ── Mobile ── */
@media (max-width: 812px) {
    .mp-section {
        padding: 16px 0 4px;
        margin-top: 12px;
    }

    .mp-block {
        padding: 10px 12px;
        margin-bottom: 8px;
    }

    .mp-invite-content {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 70vh;
    }

    .mp-invite-modal {
        align-items: flex-end;
    }

    .mp-editor {
        padding: 12px;
    }

    .mp-invite-landing {
        flex-direction: column;
        text-align: center;
    }
}
