/* ========================================
   Moderation - Rules, Reports, Jury
   ======================================== */

/* Rule Management */
.section-hint {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

#rules-container .rule-item {
    background: var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

#rules-container .rule-item:last-child {
    margin-bottom: 0;
}

.rule-display .rule-expandable-edit {
    cursor: pointer;
    margin-bottom: 8px;
}

.rule-display .rule-expandable-edit summary {
    list-style: none;
}

.rule-display .rule-expandable-edit summary::-webkit-details-marker {
    display: none;
}

.rule-display .rule-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rule-display .rule-name {
    font-weight: 600;
    color: var(--text);
    transition: color 0.15s ease;
}

.rule-display .rule-expandable-edit:hover .rule-name {
    color: var(--primary);
}

.rule-display .rule-penalty {
    font-size: 12px;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.rule-display .rule-description {
    color: var(--text-muted);
    font-size: 14px;
    margin: 8px 0 0 0;
    line-height: 1.5;
}

.rule-actions {
    display: flex;
    gap: 12px;
}

.rule-actions .link-btn {
    font-size: 13px;
    font-weight: 500;
}

.rule-actions .rule-delete-btn {
    color: var(--danger);
}

.rule-actions .rule-delete-btn:hover {
    color: var(--danger-dark);
}

.rule-edit-form {
    padding-top: 8px;
}

.rule-edit-form .form-group {
    margin-bottom: 12px;
}

.rule-edit-form .form-group:last-of-type {
    margin-bottom: 16px;
}

.rule-edit-form label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.rule-edit-form input,
.rule-edit-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
    transition: all 0.15s ease;
}

.rule-edit-form input:focus,
.rule-edit-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.rule-edit-form input[type="number"] {
    width: 100px;
}

.add-rule-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

#add-rule-form {
    margin-top: 16px;
    background: var(--border-light);
    padding: 16px;
    border-radius: var(--radius-sm);
}

#add-rule-form .form-group {
    margin-bottom: 12px;
}

#add-rule-form .form-group:last-of-type {
    margin-bottom: 16px;
}

#add-rule-form input,
#add-rule-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
    transition: all 0.15s ease;
}

#add-rule-form input:focus,
#add-rule-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#add-rule-form input[type="number"] {
    width: 100px;
}

.no-rules {
    color: var(--text-muted);
    font-style: italic;
    padding: 16px;
    text-align: center;
    background: var(--border-light);
    border-radius: var(--radius-sm);
}

/* Report Form */
.report-form-container {
    /* Full width */
}

.report-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.report-header h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
}

.report-header .subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 16px;
    font-weight: 400;
}

.report-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.report-target-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.report-target-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.target-preview {
    background: var(--border-light);
    padding: 16px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.6;
}

.target-preview strong {
    color: var(--text);
    font-weight: 600;
}

.target-preview .meta {
    color: var(--text-muted);
    font-size: 13px;
    margin: 4px 0 0 0;
}

.target-preview .content {
    color: var(--text);
    margin: 12px 0 0 0;
}

.target-preview .warning {
    background: #fef3c7;
    color: #92400e;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin: 12px 0 0 0;
}

.report-rules-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.report-rules-section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--text);
}

.rule-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.rule-card {
    position: relative;
    background: var(--border-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    overflow: hidden;
}

.rule-card:hover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: var(--shadow-sm);
}

.rule-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.rule-card-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
}

.rule-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-light);
    border-radius: 50%;
    cursor: pointer;
    background: white;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin: 0;
}

.rule-radio:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.rule-radio:checked {
    background: var(--primary);
    border-color: var(--primary-dark);
    box-shadow: inset 0 0 0 2px white;
}

.rule-card-content {
    flex: 1;
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rule-name {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.rule-scope {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rule-scope.board-scope {
    background: #dbeafe;
    color: #0369a1;
}

.rule-scope.site-scope {
    background: #dcfce7;
    color: #15803d;
}

.rule-details-toggle {
    padding: 0 16px;
}

.rule-details-toggle summary {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    list-style: none;
}

.rule-details-toggle summary::-webkit-details-marker {
    display: none;
}

.rule-details-toggle summary:hover {
    color: var(--primary);
}

.rule-details-toggle[open] summary {
    color: var(--primary);
}

.rule-details-toggle .rule-description {
    padding: 0 0 12px 0;
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.rule-checkmark {
    display: none;
    font-size: 20px;
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.rule-card-label:has(input:checked) .rule-checkmark {
    display: block;
}

.report-info {
    background: var(--border-light);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 24px;
}

.report-info h4 {
    margin: 0 0 12px 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.report-info ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.report-info li {
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}
