/* warnings / notifications */
.berrors {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 24px 0;
	background: #fffbe6;
	color: #5d4037;
	line-height: 1.5;
	font-size: 15px;
	font-weight: 500;
	border-radius: var(--radius-xl);
	padding: 14px 20px;
	border: 1.5px solid rgba(243, 156, 18, 0.35);
	box-shadow: 0 1px 0 rgba(214, 137, 16, 0.2);
}
.berrors_icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #5d4037;
	margin-top: 1px;
}
.berrors_icon svg {
	width: 24px;
	height: 24px;
	display: block;
}
.berrors_body {
	flex: 1;
	min-width: 0;
}
.berrors_head {
	color: #5d4037;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.4px;
	margin-bottom: 4px;
}
.berrors_text {
	color: #795548;
	font-size: 14px;
	line-height: 1.6;
}
.berrors:not(:has(.berrors_icon)) {
	display: block;
}
.full > .berrors {margin: 0 -10px;}
.berrors span {font-weight: 500;}
.title_quote {font-weight: 500;}
.quote {position: relative;}

.opencast table {display: block; width: 100%; overflow: auto;}
.opencast table tr {background-color: var(--bg-card); border-top: 1px solid var(--border-medium);}
.opencast table td, .opencast table th {padding: 6px 13px; border: 1px solid var(--border-light);}
.opencast table th {font-weight: 600;}
.opencast table tr:nth-child(2n) {background-color: var(--bg-tertiary);}
.form-wrap h1 {font-size:24px; margin-bottom:20px;}
.form-wrap > div {margin-bottom:20px;}
.form-checks input[type="checkbox"] {width: 14px; height: 14px; cursor: pointer; vertical-align: initial;}
.form-item {margin-bottom:20px; padding-left:200px; position:relative;}
.form-item > label {display:block; float:left; width:200px; margin-left:-200px; padding-top:10px;}
.form-item > input[type="text"], .form-item > input[type="password"], .form-item > input[type="file"] {float:left; max-width:600px;}
.imp > label:after {content: "*"; margin: 0 0 0 5px; color: #e3000f; font-weight: 700;}
.form-submit button {background: var(--text-main); color: var(--text-white); padding: 7px 16px; border-radius: var(--radius-md); cursor: pointer; font-weight: 500; font-size: 14px; border: none; transition: background-color var(--transition-base);}
.form-submit button:hover {background: var(--text-black);}
.findrelated {background: var(--warning-bg, #ffc); border: 1px solid var(--border-medium); padding: 5px;}
.form-textarea > label {display: block; padding: 10px 20px; background-color: var(--text-main); color: var(--bg-card); font-size: 16px; border-radius: var(--radius-sm); margin-bottom: 10px;}
#category {width:100% !important;}
.form-checks input#allow_main {margin-left:50px;}
.form-checks label, #allow_subscribe + label {display: inline-block; margin-left: 5px; position: relative; top: -2px; cursor: pointer;}
.form-secur {width:100%; float:right;}
.form-secur input {display:inline-block !important; max-width:300px; vertical-align:top;}
.form-secur > a {display:inline-block; vertical-align:top; margin-left:10px;}
.form-secur select {margin: 0;}
.form-item > input[type="button"] {position: absolute; right: 5px; top: 5px; height: 30px; line-height: 15px; font-weight: 500; padding: 7px 14px;}
/* User popup */
.profile-popup {
    --pp-accent: var(--link-color);
    --pp-accent-rgb: 12, 107, 182;
    --pp-rep-rgb: 215, 154, 0;
    --pp-msg-rgb: 12, 107, 182;
    --pp-sub-rgb: 139, 92, 246;
    --pp-card-bg: var(--bg-card);
    --pp-card-border: var(--border-light);
    --pp-meta-bg: var(--bg-secondary);
    --pp-cover: linear-gradient(135deg, rgba(12, 107, 182, 0.18) 0%, rgba(139, 92, 246, 0.18) 50%, rgba(16, 185, 129, 0.16) 100%);
    --pp-cover-pattern: radial-gradient(rgba(15, 23, 42, 0.10) 1px, transparent 1.4px);
    position: relative;
    display: grid;
    gap: 16px;
    width: min(500px, calc(100vw - 64px));
    max-width: 100%;
    margin: -4px 0;
    animation: pp-fade-in 0.28s ease-out both;
}
/* Reputation-tinted theme: cover gradient + avatar glow follow user reputation level */
.profile-popup:has(.rep-value.rep-Unranked) {
    --pp-accent-rgb: 120, 113, 108;
    --pp-cover: linear-gradient(135deg, rgba(214, 211, 209, 0.26) 0%, rgba(168, 162, 158, 0.20) 50%, rgba(120, 113, 108, 0.16) 100%);
}
.profile-popup:has(.rep-value.rep-Negative) {
    --pp-accent-rgb: 220, 38, 38;
    --pp-cover: linear-gradient(135deg, rgba(248, 113, 113, 0.32) 0%, rgba(220, 38, 38, 0.28) 50%, rgba(127, 29, 29, 0.22) 100%);
}
.profile-popup:has(.rep-value.rep-Bronze) {
    --pp-accent-rgb: 184, 115, 51;
    --pp-cover: linear-gradient(135deg, rgba(205, 127, 50, 0.30) 0%, rgba(146, 64, 14, 0.24) 55%, rgba(101, 49, 17, 0.20) 100%);
}
.profile-popup:has(.rep-value.rep-Silver) {
    --pp-accent-rgb: 71, 85, 105;
    --pp-cover: linear-gradient(135deg, rgba(241, 245, 249, 0.36) 0%, rgba(148, 163, 184, 0.22) 45%, rgba(125, 211, 252, 0.22) 100%);
}
.profile-popup:has(.rep-value.rep-Gold) {
    --pp-accent-rgb: 215, 154, 0;
    --pp-cover: linear-gradient(135deg, rgba(250, 204, 21, 0.26) 0%, rgba(215, 154, 0, 0.22) 50%, rgba(180, 83, 9, 0.18) 100%);
}
@keyframes pp-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.profile-popup__summary {
    position: relative;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 18px 14px;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(var(--pp-accent-rgb), 0.10);
}
.profile-popup__summary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--pp-cover);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}
.profile-popup__summary::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.55), transparent 50%),
        radial-gradient(circle at 86% 78%, rgba(255, 255, 255, 0.22), transparent 55%),
        var(--pp-cover-pattern);
    background-size: auto, auto, 14px 14px;
    pointer-events: none;
    z-index: 0;
}
.profile-popup__avatar {
    position: relative;
    z-index: 1;
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border-radius: var(--radius-full);
    background:
        var(--bg-card)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23909090' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E")
        no-repeat center / 32px;
    box-shadow:
        0 0 0 4px var(--bg-card),
        0 0 0 5px rgba(var(--pp-accent-rgb), 0.22),
        0 16px 32px -12px rgba(15, 23, 42, 0.32);
}
.profile-popup__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}
.profile-popup__avatar:has(img[src*="noavatar"]) img {display: none;}
.profile-popup__stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.profile-popup__stat {
    --pp-stat-rgb: var(--pp-accent-rgb);
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 11px 11px 10px;
    overflow: hidden;
    background: var(--pp-card-bg);
    border: 1px solid var(--pp-card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition:
        border-color var(--transition-base),
        transform var(--transition-base),
        box-shadow var(--transition-base);
}
.profile-popup__stat::after {
    content: "";
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--pp-stat-rgb), 0.55), transparent);
    border-radius: 0 0 2px 2px;
    opacity: 0.55;
    transition: opacity var(--transition-base);
}
.profile-popup__stat:nth-child(1) { --pp-stat-rgb: var(--pp-rep-rgb); }
.profile-popup__stat:nth-child(2) { --pp-stat-rgb: var(--pp-msg-rgb); }
.profile-popup__stat:nth-child(3) { --pp-stat-rgb: var(--pp-sub-rgb); }
.profile-popup__stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--pp-stat-rgb), 0.12), rgba(var(--pp-stat-rgb), 0) 65%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}
.profile-popup__stat:has(.profile-popup__stat-value > a):hover {
    border-color: rgba(var(--pp-stat-rgb), 0.24);
    box-shadow: 0 4px 10px -8px rgba(var(--pp-stat-rgb), 0.35);
}
.profile-popup__stat:has(.profile-popup__stat-value > a):hover::before { opacity: 0.6; }
.profile-popup__stat:has(.profile-popup__stat-value > a):hover::after { opacity: 0.85; }
.profile-popup__stat:has(.profile-popup__stat-value > a) { cursor: pointer; }
.profile-popup__stat-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgb(var(--pp-stat-rgb));
    background:
        radial-gradient(circle at 30% 30%, rgba(var(--pp-stat-rgb), 0.22), rgba(var(--pp-stat-rgb), 0.10) 70%);
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(var(--pp-stat-rgb), 0.22);
    transition: transform var(--transition-base), background var(--transition-base);
}
.profile-popup__stat:has(.profile-popup__stat-value > a):hover .profile-popup__stat-icon {
    background:
        radial-gradient(circle at 30% 30%, rgba(var(--pp-stat-rgb), 0.28), rgba(var(--pp-stat-rgb), 0.14) 70%);
}
.profile-popup__stat-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}
.profile-popup__stat-body {
    position: relative;
    display: grid;
    gap: 1px;
    min-width: 0;
    z-index: 1;
}
.profile-popup__stat-value {
    min-width: 0;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-popup__stat:has(.profile-popup__stat-value > a) .profile-popup__stat-value {
    color: rgb(var(--pp-stat-rgb));
}
.profile-popup__stat-value a,
.profile-popup__stat-value span {
    color: inherit;
    font: inherit;
}
.profile-popup__stat-value a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
}
.profile-popup__stat-value a:focus-visible::after {
    outline: 2px solid rgb(var(--pp-stat-rgb));
    outline-offset: 2px;
}
.profile-popup__stat-label {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-popup__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.profile-popup__meta li {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    align-content: center;
    column-gap: 10px;
    row-gap: 3px;
    min-width: 0;
    padding: 7px 11px;
    background: var(--pp-meta-bg);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
}
.profile-popup__meta li::before {
    content: "";
    grid-row: 1 / span 2;
    grid-column: 1 / 2;
    width: 28px;
    height: 28px;
    background:
        linear-gradient(135deg, rgba(var(--pp-accent-rgb), 0.18), rgba(var(--pp-accent-rgb), 0.07));
    border-radius: 9px;
    box-shadow: inset 0 0 0 1px rgba(var(--pp-accent-rgb), 0.20);
}
.profile-popup__label {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.profile-popup__label svg {
    position: absolute;
    top: 50%;
    left: 25px;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: rgb(var(--pp-accent-rgb));
    transform: translate(-50%, -50%);
}
.profile-popup__value {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    min-width: 0;
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.005em;
    text-align: left;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-popup__value a {color: inherit; font-weight: 700;}
.profile-popup .rep-value {transition: color var(--transition-base);}
.profile-popup .rep-value.rep-Unranked {color:#6b7280;}
.profile-popup .rep-value.rep-Negative {color:#9f3d32;}
.profile-popup .rep-value.rep-Bronze {color:#c76628;}
.profile-popup .rep-value.rep-Silver {color:#5f738e;}
.profile-popup .rep-value.rep-Gold {color:#d79a00;}
@media (max-width: 520px) {
    .profile-popup { min-width: 0; gap: 14px; }
    .profile-popup__summary {
        grid-template-columns: 1fr;
        gap: 14px;
        justify-items: center;
        text-align: center;
        padding: 16px 12px;
    }
    .profile-popup__avatar { width: 64px; height: 64px; }
    .profile-popup__stats { width: 100%; gap: 6px; }
    .profile-popup__stat { padding: 9px 10px; border-radius: var(--radius-md); grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
    .profile-popup__stat-icon { width: 28px; height: 28px; border-radius: 8px; }
    .profile-popup__stat-icon svg { width: 14px; height: 14px; }
    .profile-popup__stat-value { font-size: 17px; }
    .profile-popup__stat-label { font-size: 9px; }
    .profile-popup__meta { gap: 6px; }
    .profile-popup__meta li { padding: 6px 10px; grid-template-columns: 26px minmax(0, 1fr); column-gap: 9px; row-gap: 2px; }
    .profile-popup__meta li::before { width: 26px; height: 26px; border-radius: 8px; }
    .profile-popup__label svg { left: 23px; width: 13px; height: 13px; }
    .profile-popup__value { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .profile-popup { animation: none; }
    .profile-popup__stat,
    .profile-popup__stat::before,
    .profile-popup__stat::after,
    .profile-popup__stat-icon { transition: none; }
}


/* search */
.search { margin: 10px 0; }
.search-page h1 { font-size: 19px; font-weight: 700; color: var(--text-black); text-transform: uppercase; }
#searchtable, #searchtable td { vertical-align: top; text-align: left }
#searchtable fieldset { font-size: 11px; border: 1px solid var(--border-medium); padding: 10px; text-align: left;
    margin: 0 4px 4px 0 !important; border-radius: var(--radius-md) }
#searchtable table, #searchtable form { margin: 0; width:100%;}
#searchtable select { background-color: var(--bg-card) }
#searchuser, #searchinput {width: 90% !important; font-size: 18px; font-weight: 700;}
.search > div {margin-bottom:10px;}
.search input[type="text"], .search select {display:block; width:100% !important; margin-bottom:10px;}
.search input[type="checkbox"], .search input[type="radio"] {margin-right:5px;}
#searchinput + br, #searchinput + br + br {display:none;}

#loading-layer {background: #000; padding: 8px 10px; color: var(--text-white); border-radius: var(--radius-xs);}

/*--- DROP MENU ---*/
#dropmenudiv { font: 12px Arial; padding: 10px; display: none; background: var(--bg-card); 
    border-radius: var(--radius-lg);  box-shadow: 0 0 50px 0 rgba(0,0,0,0.22); z-index: var(--z-sticky) !important;}
#dropmenudiv a { display: block; text-decoration: none; padding: 5px 8px; width: 154px }

/*--- SEARCH SUGGESTIONS---*/
#searchsuggestions {z-index: 99998; width: 340px; max-height: 445px; overflow-y: auto; overflow-x: hidden; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.12); scrollbar-width: thin; scrollbar-color: var(--search-scrollbar, rgba(0, 0, 0, 0.2)) transparent;}
#searchsuggestions::-webkit-scrollbar {width: 6px;}
#searchsuggestions::-webkit-scrollbar-track {background: transparent;}
#searchsuggestions::-webkit-scrollbar-thumb {background: var(--search-scrollbar, rgba(0, 0, 0, 0.2)); border-radius: 3px;}
#searchsuggestions a, #searchsuggestions span.notfound { padding:8px 10px; display: block; text-decoration: none; border-bottom: 1px solid var(--border-light); font-weight:normal;}
#searchsuggestions a:hover {background-color: var(--bg-hover);}
#searchsuggestions span.searchheading {display: block; margin-bottom: 5px; font-weight: bold; font-size: 16px;}
#searchsuggestions span.seperator {
    display: block;
}
#searchsuggestions span.seperator a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    border: 0 none;
    border-top: 1px solid rgba(161, 161, 170, 0.2);
    background: rgba(244, 244, 245, 0.38);
    transition: background-color 0.15s cubic-bezier(0.2, 0, 0, 1), border-color 0.15s cubic-bezier(0.2, 0, 0, 1), color 0.15s cubic-bezier(0.2, 0, 0, 1);
}
#searchsuggestions span.seperator a:hover {
    border-top-color: rgba(161, 161, 170, 0.35);
    background: rgba(244, 244, 245, 0.7);
}
#searchsuggestions span.seperator a::after {
    content: "";
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: 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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: 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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1);
}
#searchsuggestions span.seperator a:hover::after {
    transform: translateX(3px);
}
#searchsuggestions span.notfound {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 20px;
    text-align: center;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    border-bottom: 0 !important;
}
#searchsuggestions span.notfound::before {
    content: "";
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    background-color: var(--text-light);
    opacity: 0.5;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3Cpath d='m13.5 8.5-5 5'/%3E%3Cpath d='m8.5 8.5 5 5'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3Cpath d='m13.5 8.5-5 5'/%3E%3Cpath d='m8.5 8.5 5 5'/%3E%3C/svg%3E") no-repeat center / contain;
}
#searchsuggestions span.notfound::after {
    content: "Попробуйте изменить запрос";
    margin-top: 4px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-light);
}
#searchsuggestions .break {display: none;}

/*--- UI WIDGETS ---*/
.ui-widget-overlay { background: #000; opacity:0.5; left: 0; top: 0; right: 0; bottom: 0; position: fixed; }
.ui-helper-clearfix::after { content: ""; display: table; clear: both; }

.ui-dialog {background-color: var(--bg-card); overflow: hidden; padding: 0; position: absolute; width: 300px; border-radius: var(--radius-lg); box-shadow: 0 2px 4px 1px rgba(0, 0, 0, 0.2); z-index: var(--z-modal);}
.ui-dialog-titlebar {padding: 15px 20px; height: 50px; border-bottom: 1px solid var(--border-light);}
.ui-dialog-title {font-size: 18px; color: var(--text-main); font-weight: 500;}

.ui-dialog .ui-dialog-content {position: relative; padding: 15px; overflow: hidden !important;}
.ui-dialog .ui-dialog-buttonpane {display: flex; border-top: 1px solid var(--border-medium); height: 42px; background-color: var(--bg-secondary); align-items: center; justify-content: center;}

.ui-dialog .ui-resizable-se { bottom: 3px; height: 14px; right: 3px; width: 14px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }

.ui-state-error { background: #fef1ec 50% 50% repeat-x !important; border: 1px solid #cd0a0a; color: #cd0a0a; }

.ui-dialog .ui-dialog-buttonset button {background: var(--bg-secondary); color: var(--text-main); font-size: var(--text-sm); font-weight: 600; margin: 0 6px; padding: 4px 15px; border-radius: var(--radius-sm); cursor: pointer;}
.ui-icon-closethick {cursor: pointer; position: absolute; background-color: var(--bg-secondary); color: var(--border-medium); border-radius: var(--radius-full); display: block; right: 8px; top: 7px; width: 36px; height: 36px; font-size: 1.34rem;}

/* ---  UI MENU --- */
.ui-autocomplete { position: absolute; cursor: default; }
.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float: left; background: var(--bg-card) 50% bottom repeat-x; border: 1px solid var(--border-medium); color: var(--text-main); }
.ui-menu .ui-menu { margin-top: -3px; }
.ui-menu .ui-menu-item { margin:0; padding: 0; float: left; clear: left; width: 100%; }
.ui-menu .ui-menu-item a { text-decoration:none; display:block; padding:.2em .4em; line-height:1.5; }
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active { margin: -1px; border: 1px solid #a7a7a7; color: #4e4e4e; font-weight: bold; }
.ui-icon-closethick:before {content: "\e916"; font-family: 'custom_ico' !important; width: 36px; height: 36px; line-height: 36px; display: block; text-indent: 0;}
.ui-front {z-index: 1000;}
.ui-button-icon-only {overflow: hidden; text-indent: -9999px;}

/*--- UPDATES TO NEW VERSIONS ---*/
.comments-tree-list {padding: 0; margin: 0;}
#dle-comments-list > .comments-tree-list > .comments-tree-item {
    border-top: 1px solid var(--bg-tertiary);
}

#dle-comments-list > .comments-tree-list > .comments-tree-item:first-child {
    border: none
}

.comments-tree-item .comments-tree-list .comm-item {
    padding-top: 0;
}

#dlefastreplycomments,
.comments-edit-area {padding: 10px; background: var(--bg-tertiary); border: 1px solid var(--border-light); border-radius: var(--radius-sm);}
#dlefastreplycomments {margin-bottom: var(--space-4);}
#dlefastreplycomments .bb-editor,
.comments-edit-area .bb-editor {padding-top: 10px;}
#dlefastreplycomments textarea {height: 118px !important; font-weight: 500; margin-bottom: 6px;}
.comments-edit-area textarea {margin-bottom: 6px;}

#dlereplypopup form > div {margin-bottom:5px;}
#dlereplypopup form input[type="text"] {padding: 6px 12px; font-size: 13px;}
#dlereplypopup form textarea {height:100px;}

 /* Отступ только для первого уровня вложенности (прямые ответы на корневой комментарий) */
 #dle-comments-list > .comments-tree-list > .comments-tree-item > .comments-tree-list > .comments-tree-item,
 #dlefastreplyesponse .comments-tree-list > .comments-tree-item {
     padding-left: 20px;
 }
 /* Все более глубокие уровни — без дополнительного отступа */
 .comments-tree-item .comments-tree-list .comments-tree-list .comments-tree-item {
     padding-left: 0;
 }

.save-buttons input[type="button"] {background: var(--bg-secondary); color: var(--text-main); font-size: 14px; margin-right: 6px; padding: 7px 16px; border-radius: var(--radius-md); cursor: pointer;}
.save-buttons input[type="button"]:hover {background: var(--border-light);}
.applychanges {background: var(--text-main) !important; color: var(--text-white) !important; padding: 7px 16px !important; border-radius: var(--radius-md) !important; font-weight: 500; font-size: 14px; transition: background-color var(--transition-base);}
.applychanges:hover {opacity: .88;}
.cancelchanges {border: 1px solid var(--border-medium) !important; font-weight: 500; padding: 7px 16px !important; border-radius: var(--radius-md) !important; font-size: 14px; transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);}
.cancelchanges:hover {background: var(--danger) !important; color: var(--text-white) !important; border-color: var(--danger) !important;}

.emoji {border: none;vertical-align: middle;width: 22px;height: 22px;}

.xfieldsrow {padding-top:5px;clear: both;}
.xfieldscolleft {float: left; width: 30%;}
.xfieldscolright {float: left;width: 70%;}
.file-box {width: 95%;max-width: 437px;border:1px solid var(--border-medium); border-radius: var(--radius-sm);background-color: var(--bg-secondary);padding: 10px;margin-top: 10px;}
.qq-uploader { position:relative; width: 100%;}
.qq-upload-button {display:inline-block;padding:0 10px;margin-top:5px; line-height:40px !important;cursor:pointer;}
.uploadedfile {width: 115px;height: 130px;margin: 10px 5px 5px;border:1px solid var(--border-medium);box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    text-align: center;background: var(--bg-card);}
.uploadedfile .info {text-align: left;white-space: nowrap;margin: 0 5px;overflow: hidden;}

.btn.disabled, .btn[disabled], fieldset[disabled] .btn {cursor:not-allowed; pointer-events:none; opacity:0.65;}

.dle-captcha { position: relative; }
.dle-captcha:after { clear: both; display: block; content: ""; }
.dle-captcha > a { float: left; margin-right: 5px; }
.dle-captcha img {position: relative;display: block;width: 130px; height: 46px; transition: opacity var(--transition-base);}
.dle-captcha > input { float: left; width: 130px; }
.xfieldsnote {color: var(--text-light);font-size: .9em;}

.static-pages {color: var(--text-main); line-height: 1.5; font-size: 1.08em;}
.static-pages h1 {padding-bottom: 5px;}

.title_spoiler {position: relative; background: var(--bg-secondary); border: 1px solid var(--border-light); font-weight: 500; border-left: 2px solid var(--border-medium); padding: 2px; padding-left: 10px;}
.title_spoiler a {color: var(--text-main);}
.title_spoiler a svg {vertical-align: text-bottom; width: 20px; height: 17px; margin-right: 2px;}
.text_spoiler {position: relative; border: 1px solid var(--border-light); background: var(--bg-tertiary); padding: 10px 14px; margin-top: -1px;}
@media screen and (max-width: 600px) {
    .form-wrap h1 {font-size:16px;}
    .form-item {padding-left:0;}
    .form-item > label {float:none; width:100%; margin-left:0; padding:0 0 10px 0;}
    .form-item > input[type="text"], .form-item > input[type="password"], .form-item > input[type="file"] {float:none;}
    .form-item > input[type="button"] {display:none;}
    .form-checks input#allow_main {margin-left:10px;}
}
/* ── DLEPush: Floating Bubble / Pill-shape ── */
.DLEPush {
	z-index: 2001;
	position: fixed;
	top: 24px;
	right: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none
}

@keyframes DLEPush-slide {
	from { transform: translateX(calc(100% + 24px)); opacity: 0 }
	to   { transform: translateX(0); opacity: 1 }
}

@keyframes DLEPush-progress {
	from { transform: scaleX(1) }
	to   { transform: scaleX(0) }
}

.DLEPush-notification.wrapper {
	animation: DLEPush-slide .4s cubic-bezier(.22,1,.36,1) both;
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 10px;
	padding: 10px 36px 10px 12px;
	min-width: 260px;
	max-width: 380px;
	width: max-content;
	border-radius: var(--radius-full);
	background: var(--bg-card);
	box-shadow: 0 8px 30px rgb(0 0 0 / .15), 0 1px 3px rgb(0 0 0 / .1);
	color: var(--text-main);
	pointer-events: auto;
	overflow: hidden;
	cursor: pointer
}

/* progress bar at the bottom */
.DLEPush-notification.wrapper::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 3px;
	background: var(--push-color, currentColor);
	opacity: .18;
	transform-origin: left;
	animation: DLEPush-progress var(--push-life, 4s) linear both
}

.DLEPush-notification .DLEPush-icon {
	grid-column: 1;
	grid-row: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--radius-full);
	background: var(--push-color, #1e88e5);
	color: var(--text-white)
}

.DLEPush-notification .DLEPush-icon svg {
	width: 16px;
	height: 16px
}

.DLEPush-notification .DLEPush-header {
	grid-column: 2;
	grid-row: 1;
	font-weight: 600;
	font-size: .8125rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis
}

.DLEPush-notification .DLEPush-header:empty {
	display: none
}

.DLEPush-notification .DLEPush-header:empty + .DLEPush-message {
	grid-row: 1 / -1
}

.DLEPush-notification .DLEPush-message {
	grid-column: 2;
	grid-row: 2;
	font-size: .8125rem;
	line-height: 1.35;
	opacity: .85
}

.DLEPush-notification .DLEPush-message li,
.DLEPush-notification .DLEPush-message ul {
	list-style: none;
	padding: 0
}

.DLEPush-notification .DLEPush-close {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: var(--radius-full);
	background: rgb(0 0 0 / .08);
	border: 0;
	font-size: .75rem;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	color: inherit;
	outline: 0;
	opacity: .6;
	transition: opacity .2s, background .2s
}

.DLEPush-notification .DLEPush-close:hover {
	opacity: 1;
	background: rgb(0 0 0 / .14)
}

/* ── Type colours ── */
.DLEPush-notification.wrapper.push-success {
	--push-color: #43a047;
	--push-life: 4s;
	background: linear-gradient(135deg, #e8f5e9 0%, var(--bg-card) 100%)
}

.DLEPush-notification.wrapper.push-warning {
	--push-color: #f9a825;
	--push-life: 6s;
	background: linear-gradient(135deg, #fff8e1 0%, var(--bg-card) 100%)
}

.DLEPush-notification.wrapper.push-error {
	--push-color: #e53935;
	--push-life: 8s;
	background: linear-gradient(135deg, #fbe9e7 0%, var(--bg-card) 100%)
}

.DLEPush-notification.wrapper.avatar-prompt-push {
	--push-color: #f9a825;
	background: linear-gradient(135deg, #fff8e1 0%, var(--bg-card) 100%)
}

.DLEPush-notification.wrapper.avatar-prompt-push .DLEPush-icon {
	background: var(--push-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") no-repeat center / 19px;
	color: var(--text-white)
}

.avatar-prompt-avatar {
	display: block;
	width: 100%;
	height: 100%
}

.DLEPush-notification.wrapper.avatar-prompt-push .DLEPush-message {
	opacity: 1
}

.avatar-prompt-link {
	display: block;
	color: inherit;
	text-decoration: none;
	cursor: pointer
}

.avatar-prompt-text {
	display: block;
	font-weight: 400;
	line-height: 1.35;
	opacity: .82
}

.avatar-prompt-text strong {
	font-weight: 700
}

.avatar-prompt-cta {
	display: inline-block;
	margin-top: 4px;
	color: var(--push-color);
	font-weight: 700;
	line-height: 1.25
}

.avatar-prompt-link:hover {
	color: inherit;
	text-decoration: none
}

.avatar-prompt-link:hover .avatar-prompt-cta {
	text-decoration: underline
}

@media only screen and (max-width: 480px) {
	.DLEPush { right: 12px; top: 12px; left: 12px }
	.DLEPush-notification.wrapper { max-width: 100%; min-width: 0; border-radius: 20px }
}

input[type="text"].comments_author_field {
	width: 100%;
	margin-bottom: 10px;
}

/* Focus states for accessibility */
.form-submit button:focus-visible,
.save-buttons input[type="button"]:focus-visible,
.ui-dialog .ui-dialog-buttonset button:focus-visible,
.applychanges:focus-visible {
	outline: 2px solid var(--link-color);
	outline-offset: 2px;
}
