/**
 * Membership Manager front-end styles.
 * Clean, minimal, professional look for forms, dashboard and downloads.
 */

:root {
        --mm-primary: #2563eb;
        --mm-primary-dark: #1d4ed8;
        --mm-bg: #ffffff;
        --mm-border: #e5e7eb;
        --mm-text: #1f2937;
        --mm-muted: #6b7280;
        --mm-success-bg: #ecfdf5;
        --mm-success-border: #10b981;
        --mm-error-bg: #fef2f2;
        --mm-error-border: #ef4444;
        --mm-radius: 10px;
}

/* Layout ------------------------------------------------------------------ */
.mm-dashboard {
        display: flex;
        flex-direction: column;
        gap: 20px;
        max-width: 900px;
        margin: 0 auto;
}

.mm-card {
        background: var(--mm-bg);
        border: 1px solid var(--mm-border);
        border-radius: var(--mm-radius);
        padding: 24px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        color: var(--mm-text);
}

.mm-form-card {
        max-width: 440px;
        margin: 0 auto;
}

/* Headings ---------------------------------------------------------------- */
.mm-form-title,
.mm-section-title,
.mm-welcome {
        margin-top: 0;
        color: var(--mm-text);
}

.mm-section-title {
        font-size: 1.15rem;
        margin-bottom: 16px;
        border-bottom: 1px solid var(--mm-border);
        padding-bottom: 10px;
}

/* Dashboard header -------------------------------------------------------- */
.mm-dashboard-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
}

.mm-tier-line {
        margin: 6px 0 0;
        color: var(--mm-muted);
}

.mm-tier-badge {
        display: inline-block;
        padding: 3px 12px;
        border-radius: 999px;
        font-size: 0.82rem;
        font-weight: 600;
        color: #fff;
        background: var(--mm-muted);
        margin-left: 6px;
        text-transform: capitalize;
}

.mm-tier-free { background: #6b7280; }
.mm-tier-basic { background: #0ea5e9; }
.mm-tier-premium { background: #f59e0b; }

/* Content grid ------------------------------------------------------------ */
.mm-content-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
}

.mm-content-item {
        border: 1px solid var(--mm-border);
        border-radius: 8px;
        padding: 16px;
        background: #f9fafb;
}

.mm-content-item h4 {
        margin: 0 0 8px;
        text-transform: capitalize;
}

.mm-content-locked {
        opacity: 0.75;
        background: #f3f4f6;
        border-style: dashed;
}

.mm-locked-note {
        color: var(--mm-muted);
        font-style: italic;
        margin: 0;
}

/* Downloads --------------------------------------------------------------- */
.mm-download-list {
        list-style: none;
        margin: 0;
        padding: 0;
}

.mm-download-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid var(--mm-border);
        gap: 12px;
}

.mm-download-item:last-child {
        border-bottom: none;
}

.mm-download-name {
        font-weight: 500;
}

/* Forms ------------------------------------------------------------------- */
.mm-form .mm-field {
        margin-bottom: 16px;
}

.mm-form label {
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
        color: var(--mm-text);
}

.mm-form input[type="text"],
.mm-form input[type="email"],
.mm-form input[type="password"] {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--mm-border);
        border-radius: 8px;
        font-size: 1rem;
        box-sizing: border-box;
}

.mm-form input:focus {
        outline: none;
        border-color: var(--mm-primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.mm-field-checkbox label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 400;
}

.mm-field-checkbox input {
        width: auto;
}

.mm-required {
        color: var(--mm-error-border);
}

.mm-form-alt {
        margin-top: 16px;
        font-size: 0.9rem;
        color: var(--mm-muted);
        text-align: center;
}

/* Buttons ----------------------------------------------------------------- */
.mm-button {
        display: inline-block;
        padding: 10px 18px;
        border-radius: 8px;
        font-size: 0.95rem;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        border: 1px solid transparent;
        transition: background 0.15s ease, color 0.15s ease;
        line-height: 1.2;
}

.mm-button-primary {
        background: var(--mm-primary);
        color: #fff;
}

.mm-button-primary:hover {
        background: var(--mm-primary-dark);
        color: #fff;
}

.mm-button-ghost {
        background: transparent;
        color: var(--mm-primary);
        border-color: var(--mm-border);
}

.mm-button-ghost:hover {
        background: #f3f4f6;
}

.mm-button-small {
        padding: 6px 14px;
        font-size: 0.85rem;
}

.mm-submit button {
        width: 100%;
}

/* Notices ----------------------------------------------------------------- */
.mm-notice {
        padding: 12px 16px;
        border-radius: 8px;
        margin-bottom: 16px;
        font-size: 0.92rem;
        border-left: 4px solid transparent;
}

.mm-notice-success {
        background: var(--mm-success-bg);
        border-left-color: var(--mm-success-border);
        color: #065f46;
}

.mm-notice-error {
        background: var(--mm-error-bg);
        border-left-color: var(--mm-error-border);
        color: #991b1b;
}

.mm-gated-notice {
        padding: 16px;
        border: 1px dashed var(--mm-border);
        border-radius: 8px;
        background: #f9fafb;
        color: var(--mm-muted);
        text-align: center;
}

/* Upgrade card ------------------------------------------------------------ */
.mm-upgrade-card {
        background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
        border-color: #fcd34d;
}

.mm-empty {
        color: var(--mm-muted);
        font-style: italic;
}

/* Admin help list --------------------------------------------------------- */
.mm-help-list {
        list-style: disc;
        margin-left: 20px;
}

.mm-help-list li {
        margin-bottom: 8px;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 600px) {
        .mm-dashboard-header {
                flex-direction: column;
                align-items: flex-start;
        }

        .mm-download-item {
                flex-direction: column;
                align-items: flex-start;
        }
}



/* --------------------------------------------------------------------- */
/* Dashboard "Your pages" list                                           */
/* --------------------------------------------------------------------- */
.mm-page-list {
        list-style: none;
        margin: 0;
        padding: 0;
}

.mm-page-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--mm-border);
}

.mm-page-item:last-child {
        border-bottom: none;
}

.mm-page-link {
        font-weight: 600;
        text-decoration: none;
        color: var(--mm-primary);
}

.mm-page-link:hover {
        color: var(--mm-primary-dark);
        text-decoration: underline;
}

@media (max-width: 600px) {
        .mm-page-item {
                flex-direction: column;
                align-items: flex-start;
        }
}



/* Member dashboard widget area (Appearance > Widgets > "Member Dashboard") */
.mm-dashboard-widgets {
        display: flex;
        flex-direction: column;
        gap: 16px;
}
.mm-dashboard-widget {
        margin: 0;
}
.mm-dashboard-widget img {
        max-width: 100%;
        height: auto;
        border-radius: var(--mm-radius);
        display: block;
}
.mm-dashboard-widget-title {
        margin: 0 0 8px;
        font-size: 18px;
        color: var(--mm-text);
}
