/*
 * Define Button Text and Background/Border Colors
 *
 * This will allow us to style <a> links as buttons that look
 * like those on the rest of mopac.org.
 */
:root {
    --mphs-button-bg: #b74634;
    --mphs-button-text: #ffffff;
}

/*
 * Style buttons in the plugin to look like those on the rest of the site.
 */
a.button.mphs-my-story__button,
a.button.mphs-my-story__button:visited,
a.button.mphs-my-story__button:hover,
a.button.mphs-my-story__button:focus,
a.button.mphs-my-story__button:active {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--mphs-button-bg);
    border: 1px solid var(--mphs-button-bg);
    color: var(--mphs-button-text) !important;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none !important;
    font-family: sans-serif;
    font-weight: bold;
    line-height: 1.2;
}


a.button.mphs-my-story__button--secondary,
a.button.mphs-my-story__button--secondary:visited {
    background-color: #ffffff;
    border-color: var(--mphs-button-bg);
    color: var(--mphs-button-bg) !important;
}

a.button.mphs-my-story__button--secondary:hover,
a.button.mphs-my-story__button--secondary:focus,
a.button.mphs-my-story__button--secondary:active {
    background-color: #f7f7f7;
    border-color: var(--mphs-button-bg);
    color: var(--mphs-button-bg) !important;
}

a.button.mphs-my-story__button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/*
 * Styles for Reviewer Feedback
 */
.mphs-my-story__review-feedback {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--mphs-button-bg);
    background-color: #f7f7f7;
}

.mphs-my-story__review-feedback p:first-child {
    margin-top: 0;
}

.mphs-my-story__review-feedback p:last-child {
    margin-bottom: 0;
}

/*
 * My Story Status Badges
 */
.mphs-my-story__status-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

.mphs-my-story__status-badge--pending {
    background-color: #fff3cd;
    border-color: #ffe69c;
    color: #664d03;
}

.mphs-my-story__status-badge--draft {
    background-color: #cff4fc;
    border-color: #9eeaf9;
    color: #055160;
}

.mphs-my-story__status-badge--published {
    background-color: #d1e7dd;
    border-color: #a3cfbb;
    color: #0a3622;
}

.mphs-my-story__status-badge--scheduled,
.mphs-my-story__status-badge--private,
.mphs-my-story__status-badge--default {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #343a40;
}

.mphs-my-story__title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/*
 * Enable/Disable Edit My Story Button
 */
.mphs-my-story__actions {
    margin-top: 1.5rem;
}

.mphs-my-story__actions button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.mphs-my-story__editing-notice {
    margin-top: 0.75rem;
    font-style: italic;
}

/*
 * Review Comments Notice Class
 */

.mphs-my-story-notice {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-left-width: 4px;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
}

.mphs-my-story-notice.notice-success {
    border-left-color: #00a32a;
}

.mphs-my-story-notice.notice-error {
    border-left-color: #d63638;
}

.mphs-my-story-notice p:first-child {
    margin-top: 0;
}

.mphs-my-story-notice p:last-child {
    margin-bottom: 0;
}

/*
 * Member Story Dashboard
 */
.mphs-my-story__dashboard-header,
.mphs-my-story__status-panel,
.mphs-my-story__story-summary {
    margin-bottom: 1.5rem;
}

.mphs-my-story__status-panel,
.mphs-my-story__story-summary {
    padding: 1.25rem;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
}

.mphs-my-story__status-panel h3,
.mphs-my-story__story-summary h3,
.mphs-my-story__review-feedback h3 {
    margin-top: 0;
}

.mphs-my-story__details {
    margin: 0;
}

.mphs-my-story__details > div {
    display: grid;
    grid-template-columns: minmax(7rem, 10rem) 1fr;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #eee;
}

.mphs-my-story__details > div:last-child {
    border-bottom: 0;
}

.mphs-my-story__details dt {
    font-weight: 700;
}

.mphs-my-story__details dd {
    margin: 0;
}

.mphs-my-story__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .mphs-my-story__details > div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/*
 * Compact member status card for the Our Stories archive.
 */
.mphs-my-story-status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin: 0 0 2rem;
    padding: 1.75rem 2rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.09);
}

.mphs-my-story-status-card__content {
    min-width: 0;
}

.mphs-my-story-status-card__title {
    margin: 0 0 0.65rem;
}

.mphs-my-story-status-card__status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.mphs-my-story-status-card__message,
.mphs-my-story-status-card__guidance,
.mphs-my-story-status-card__editing-notice {
    margin: 0.4rem 0 0;
}

.mphs-my-story-status-card__actions {
    flex: 0 0 auto;
    margin: 0;
}

.mphs-my-story-status-card .mphs-my-story__status-badge {
    margin-left: 0;
}

/*
 * Editor displayed immediately below the status card.
 */
.mphs-my-story-editor {
    scroll-margin-top: 2rem;
    margin: 0 0 2.5rem;
    padding: 2rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.09);
}

.mphs-my-story-editor__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.mphs-my-story-editor__header h2 {
    margin-top: 0;
}

.mphs-my-story-editor__close {
    white-space: nowrap;
}

.mphs-my-story-editor input[type="text"],
.mphs-my-story-editor select,
.mphs-my-story-editor textarea {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 700px) {
    .mphs-my-story-status-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.4rem;
    }

    .mphs-my-story-status-card__actions {
        width: 100%;
    }


    .mphs-my-story-status-card__actions .mphs-my-story__button {
        display: block;
        width: 100%;
        min-height: 44px;
        text-align: center;
    }

    .mphs-my-story-editor {
        padding: 1.4rem;
    }

    .mphs-my-story-editor__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }
}
