/**
 * Hello Middleton - Community Guidelines Page Styles
 * Trust system documentation and rules display
 *
 * @requires tokens.css
 * @since 2.1.4
 */

/* ==========================================================================
   COMMUNITY GUIDELINES - Page Container
   ========================================================================== */

.community-guidelines {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.guidelines-intro {
    font-size: 17px;
    color: var(--mn-text-muted, #64748b);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ==========================================================================
   HEADINGS
   ========================================================================== */

.community-guidelines h2 {
    font: 700 24px/1.3 system-ui, -apple-system, sans-serif;
    color: var(--mn-text-primary, #0f172a);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--mn-primary, #1e40af);
}

.community-guidelines h3 {
    font: 600 18px system-ui;
    color: var(--mn-text-primary, #0f172a);
    margin: 24px 0 12px;
}

/* ==========================================================================
   TRUST EARNING TABLE
   ========================================================================== */

.trust-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
}

.trust-table th,
.trust-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--mn-border, #e2e8f0);
}

.trust-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--mn-text-primary, #0f172a);
}

.trust-table td:nth-child(2) {
    color: #16a34a;
    font-weight: 600;
}

/* ==========================================================================
   RANK CARDS
   ========================================================================== */

.rank-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.rank-card {
    background: var(--mn-bg-card, #ffffff);
    border: 1px solid var(--mn-border, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(0,0,0,0.1);
}

.rank-card h4 {
    font: 700 18px system-ui;
    margin: 0 0 4px;
}

.rank-card .rank-range {
    font: 500 12px system-ui;
    color: var(--mn-text-muted, #64748b);
    margin: 0 0 12px;
}

.rank-card ul {
    margin: 0 0 12px;
    padding-left: 20px;
    font-size: 14px;
}

.rank-card li {
    margin-bottom: 4px;
}

.rank-card .rank-tip {
    font-size: 13px;
    color: var(--mn-text-muted, #64748b);
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--mn-border, #e2e8f0);
    font-style: italic;
}

/* Rank Card Colors - Left Border Accent */
.rank-newcomer { border-left: 4px solid #94a3b8; }
.rank-newcomer h4 { color: #64748b; }

.rank-member { border-left: 4px solid #3b82f6; }
.rank-member h4 { color: #2563eb; }

.rank-trusted { border-left: 4px solid #8b5cf6; }
.rank-trusted h4 { color: #7c3aed; }

.rank-veteran { border-left: 4px solid #f59e0b; }
.rank-veteran h4 { color: #d97706; }

/* ==========================================================================
   RULES LIST
   ========================================================================== */

.rules-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.rule {
    background: var(--mn-bg-card, #ffffff);
    border-radius: 12px;
    padding: 20px;
}

.rule h4 {
    font: 600 16px system-ui;
    margin: 0 0 12px;
}

.rule ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
}

/* Rule Types */
.rule-do {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.rule-do h4 {
    color: #16a34a;
}

.rule-dont {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.rule-dont h4 {
    color: #dc2626;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.guidelines-footer {
    margin-top: 40px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
    color: var(--mn-text-muted, #64748b);
    font-size: 14px;
}

/* ==========================================================================
   MODERATOR CALLOUT
   ========================================================================== */

.moderator-callout {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

/* ==========================================================================
   RESPONSIVE - Tablet (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    .community-guidelines {
        padding: 16px;
    }

    .community-guidelines h2 {
        font-size: 20px;
        margin: 32px 0 12px;
    }

    .community-guidelines h3 {
        font-size: 16px;
    }

    .guidelines-intro {
        font-size: 15px;
    }

    .rank-cards {
        grid-template-columns: 1fr;
    }

    .rules-list {
        grid-template-columns: 1fr;
    }

    .trust-table {
        font-size: 13px;
    }

    .trust-table th,
    .trust-table td {
        padding: 10px 12px;
    }
}

/* ==========================================================================
   ACCESSIBILITY - REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .rank-card {
        transition: none;
    }

    .rank-card:hover {
        transform: none;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .community-guidelines {
        max-width: 100%;
    }

    .rank-card,
    .rule {
        break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
