/* Shared interface elements used across the whole site: alerts and checkboxes.
   Area stylesheets may change layout (margins, sizes) but not these looks. */

/* Alerts */
.alert {
    --site-alert-color: #d6d6da;
    --site-alert-border: rgba(255, 255, 255, 0.1);
    --site-alert-background: #222328;
    --site-alert-icon-color: #9a9ba2;
    --site-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E");
    position: relative;
    padding: 14px 18px;
    padding-inline-start: 46px;
    color: var(--site-alert-color);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.88rem;
    line-height: 1.55;
    text-align: start;
    border: 1px solid var(--site-alert-border);
    border-radius: 9px;
    background: var(--site-alert-background);
    box-shadow: none;
}

.alert::before {
    position: absolute;
    top: 15px;
    inset-inline-start: 17px;
    width: 18px;
    height: 18px;
    content: "";
    background: var(--site-alert-icon-color);
    -webkit-mask: var(--site-alert-icon) center / contain no-repeat;
    mask: var(--site-alert-icon) center / contain no-repeat;
}

.alert-success {
    --site-alert-color: #b9f0c9;
    --site-alert-border: rgba(52, 199, 89, 0.35);
    --site-alert-background: rgba(52, 199, 89, 0.08);
    --site-alert-icon-color: #34c759;
    --site-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.5 2.6 2.5L16 9.5'/%3E%3C/svg%3E");
}

.alert-danger {
    --site-alert-color: #ffb3ba;
    --site-alert-border: rgba(220, 53, 69, 0.4);
    --site-alert-background: rgba(220, 53, 69, 0.1);
    --site-alert-icon-color: #f16d79;
    --site-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E");
}

.alert-warning {
    --site-alert-color: #ffe3a1;
    --site-alert-border: rgba(255, 193, 7, 0.38);
    --site-alert-background: rgba(255, 193, 7, 0.08);
    --site-alert-icon-color: #ffc107;
    --site-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2 2.8 17.5A2 2 0 0 0 4.5 20.5h15a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9.5v4M12 17h.01'/%3E%3C/svg%3E");
}

.alert-info {
    --site-alert-color: #bcdcff;
    --site-alert-border: rgba(64, 156, 255, 0.35);
    --site-alert-background: rgba(64, 156, 255, 0.08);
    --site-alert-icon-color: #4c9dff;
}

.alert a:not(.btn) {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.alert strong {
    color: inherit;
}

.alert ul,
.alert ol {
    margin: 0;
    padding-inline-start: 18px;
}

.alert > :last-child {
    margin-bottom: 0;
}

/* Checkboxes */
input[type="checkbox"],
.form-check-input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    vertical-align: -3px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: #1d1e23;
    background-image: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px;
    box-shadow: none;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

input[type="checkbox"]:hover,
.form-check-input[type="checkbox"]:hover {
    border-color: rgba(255, 193, 7, 0.65);
}

input[type="checkbox"]:focus,
.form-check-input[type="checkbox"]:focus {
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
    box-shadow: none;
}

input[type="checkbox"]:focus-visible,
.form-check-input[type="checkbox"]:focus-visible {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.22);
}

input[type="checkbox"]:checked,
.form-check-input[type="checkbox"]:checked {
    border-color: #ffc107;
    background-color: #ffc107;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111216' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-6.5'/%3E%3C/svg%3E");
}

input[type="checkbox"]:indeterminate,
.form-check-input[type="checkbox"]:indeterminate {
    border-color: #ffc107;
    background-color: #ffc107;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111216' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E");
}

input[type="checkbox"]:disabled,
.form-check-input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

input[type="checkbox"]:disabled ~ .form-check-label,
.form-check-input[type="checkbox"]:disabled ~ .form-check-label {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Destructive choices (deleting an account, banning or disabling one). */
.checkbox-danger input[type="checkbox"]:hover,
input[type="checkbox"].checkbox-danger:hover {
    border-color: rgba(241, 109, 121, 0.7);
}

.checkbox-danger input[type="checkbox"]:focus-visible,
input[type="checkbox"].checkbox-danger:focus-visible {
    border-color: #f16d79;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.checkbox-danger input[type="checkbox"]:checked,
input[type="checkbox"].checkbox-danger:checked {
    border-color: #dc3545;
    background-color: #dc3545;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-6.5'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
    input[type="checkbox"],
    .form-check-input[type="checkbox"] {
        transition: none;
    }
}
