/**
 * FundMyMusic Campaign Community — styles.
 *
 * Teal (#159590) matches the existing creator-dashboard chrome
 * (fmm-creator-manager / fmm-renewal-panel) so the Community section
 * reads as part of the same system rather than a bolted-on add-on.
 */
:root {
    --fmm-community-teal: #159590;
    --fmm-community-teal-dark: #0f716d;
    --fmm-community-border: #d8d8d2;
    --fmm-community-bg: #f7f7f4;
    --fmm-community-text: #2b2b2b;
    --fmm-community-text-muted: #6b6b6b;
    --fmm-community-gold: #b8860b;
    --fmm-community-gold-bg: #fdf3dc;
}

.fmm-community-feed,
.fmm-community-dashboard-panel {
    box-sizing: border-box;
    /* 850px matches .fmm-public-campaign-description (the "About this
       project" / "Project creator?" panels on the same page), so the
       Community section lines up with the rest of the campaign content
       instead of reading as a narrower, separate block. */
    max-width: 850px;
    margin: 40px auto;
    color: var(--fmm-community-text);
}
.fmm-community-feed *,
.fmm-community-dashboard-panel * {
    box-sizing: border-box;
}
.fmm-community-feed h2,
.fmm-community-dashboard-panel h2 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
}
.fmm-community-dashboard-panel h3,
.fmm-community-composer h3 {
    margin: 30px 0 14px;
    font-size: 17px;
    font-weight: 700;
}

/* ---------------------------------------------------------------- */
/* Timeline                                                          */
/* ---------------------------------------------------------------- */
.fmm-community-timeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.fmm-community-empty {
    padding: 20px;
    background: var(--fmm-community-bg);
    border: 1px solid var(--fmm-community-border);
    border-radius: 4px;
    color: var(--fmm-community-text-muted);
}
.fmm-community-item {
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--fmm-community-border);
    border-radius: 4px;
}
.fmm-community-item--creator {
    background: var(--fmm-community-bg);
    border-left: 4px solid var(--fmm-community-teal);
}
.fmm-community-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.fmm-community-item-name {
    font-weight: 700;
}
.fmm-community-item-date {
    font-size: 13px;
    color: var(--fmm-community-text-muted);
}
.fmm-community-creator-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    background: var(--fmm-community-teal);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: middle;
}
.fmm-community-kind-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 8px;
    background: #eef2fb;
    color: #35538f;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.fmm-community-tags {
    margin: 0 0 10px;
}
.fmm-community-tag {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 3px 10px;
    background: #e8f5f3;
    color: var(--fmm-community-teal-dark);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.fmm-community-item-content p {
    margin: 0 0 12px;
    line-height: 1.6;
}
.fmm-community-item-content p:last-child {
    margin-bottom: 0;
}
.fmm-community-reply {
    margin-top: 16px;
    padding-left: 18px;
    border-left: 3px solid var(--fmm-community-border);
}
.fmm-community-reply .fmm-community-item {
    border: none;
    padding: 0;
    background: none;
}
.fmm-community-reply-form {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 14px;
}
.fmm-community-reply-form textarea {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #bbb;
    background: #fff;
    font: inherit;
    resize: vertical;
    min-height: 40px;
}
.fmm-community-reply-form button {
    padding: 8px 16px;
    border: 0;
    border-radius: 3px;
    background: var(--fmm-community-teal);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.fmm-community-reply-form button:hover {
    background: var(--fmm-community-teal-dark);
}

/* ---------------------------------------------------------------- */
/* Guidelines                                                        */
/* ---------------------------------------------------------------- */
.fmm-community-guidelines {
    margin-top: 20px;
    padding: 14px 18px;
    background: var(--fmm-community-bg);
    border: 1px solid var(--fmm-community-border);
    border-radius: 4px;
    font-size: 14px;
}
.fmm-community-guidelines summary {
    cursor: pointer;
    font-weight: 600;
}
.fmm-community-guidelines ul {
    margin: 10px 0 0;
    padding-left: 20px;
    color: var(--fmm-community-text-muted);
}
.fmm-community-guidelines li {
    margin-bottom: 4px;
}

/* ---------------------------------------------------------------- */
/* Submission form                                                   */
/* ---------------------------------------------------------------- */
.fmm-community-form-wrap {
    margin-top: 30px;
    padding: 24px;
    background: var(--fmm-community-bg);
    border: 1px solid var(--fmm-community-border);
    border-radius: 4px;
}
.fmm-community-form-wrap h3 {
    margin: 0 0 16px;
    font-size: 17px;
}
.fmm-community-form-wrap form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.fmm-community-form-wrap label,
.fmm-community-composer label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}
.fmm-community-form-wrap input[type="text"],
.fmm-community-form-wrap input[type="email"],
.fmm-community-form-wrap textarea,
.fmm-community-composer textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #bbb;
    background: #fff;
    font: inherit;
}
.fmm-community-form-wrap textarea,
.fmm-community-composer textarea {
    min-height: 100px;
    resize: vertical;
}
.fmm-community-kind-choice,
.fmm-community-tags-field {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    border: 0;
}
.fmm-community-kind-choice label,
.fmm-community-tags-field label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}
.fmm-community-tags-field legend {
    width: 100%;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}
.fmm-community-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.fmm-community-submit,
.fmm-community-composer-actions button,
.fmm-community-pending-actions button {
    align-self: flex-start;
    padding: 12px 22px;
    border: 0;
    border-radius: 3px;
    background: var(--fmm-community-teal);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.fmm-community-submit:hover,
.fmm-community-composer-actions button:hover,
.fmm-community-pending-actions button:hover {
    background: var(--fmm-community-teal-dark);
}
.fmm-community-sent-notice {
    padding: 12px 16px;
    margin-bottom: 4px;
    background: #e8f5f3;
    border-left: 4px solid var(--fmm-community-teal);
}

/* ---------------------------------------------------------------- */
/* Creator dashboard: moderation + composer                          */
/* ---------------------------------------------------------------- */
.fmm-community-dashboard-panel {
    margin: 34px 0 0;
    padding: 26px 28px;
    background: #fff;
    border: 1px solid var(--fmm-community-border);
    border-radius: 4px;
}
.fmm-community-pending-item {
    padding: 16px 18px;
    margin-bottom: 14px;
    background: var(--fmm-community-bg);
    border: 1px solid var(--fmm-community-border);
    border-radius: 4px;
}
.fmm-community-pending-item:last-child {
    margin-bottom: 0;
}
.fmm-community-pending-meta {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--fmm-community-text-muted);
}
.fmm-community-pending-item textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #bbb;
    background: #fff;
    font: inherit;
}
.fmm-community-pending-actions,
.fmm-community-composer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.fmm-community-pending-actions button[name="fmm_moderation_action"][value="reject"] {
    background: #b3382c;
}
.fmm-community-pending-actions button[name="fmm_moderation_action"][value="reject"]:hover {
    background: #8f2c22;
}
.fmm-community-composer {
    margin-top: 26px;
}
.fmm-community-milestone-nudge {
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--fmm-community-gold-bg);
    border-left: 4px solid var(--fmm-community-gold);
    font-size: 14px;
}
.fmm-community-composer-actions button[name="fmm_community_action"][value="dismiss_milestone"] {
    background: #999;
}
.fmm-community-composer-actions button[name="fmm_community_action"][value="dismiss_milestone"]:hover {
    background: #7a7a7a;
}
.fmm-community-composer form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------------------------------------------------------------- */
/* Responsive                                                        */
/* ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .fmm-community-item,
    .fmm-community-form-wrap,
    .fmm-community-dashboard-panel {
        padding: 16px;
    }
    .fmm-community-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
