/* Заместители на DevExtreme контролите, които прототипът не зарежда (DropDownBox с грид, TagBox,
   TextArea, Button, notify, dialog.confirm). Класовете са истинските dx-* класове, а видът е на темата
   dx.light в режим editorStylingMode: 'underlined' (CL.Web/wwwroot/js/dx-license.js) — само долна линия,
   без рамка. Поведението идва от /js/dx-shims.js. */

.dx-texteditor.dx-editor-underlined {
    position: relative; background: transparent; border: 0; border-bottom: 1px solid #ddd;
    border-radius: 0; transition: border-color .15s;
}
.dx-texteditor.dx-editor-underlined:hover { border-bottom-color: #333; }
.dx-texteditor.dx-editor-underlined.dx-state-focused { border-bottom-color: #337ab7; }
.dx-texteditor.dx-editor-underlined.dx-state-focused::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: #337ab7;
}

.dx-texteditor-container { display: flex; align-items: center; width: 100%; min-height: 36px; }
.dx-texteditor-input {
    flex: 1 1 auto; min-width: 40px; border: 0; outline: 0; background: transparent; padding: 7px 0 8px;
    font: inherit; color: #333; line-height: 1.3;
}
.dx-texteditor-input::placeholder { color: #999; opacity: 1; }
textarea.dx-texteditor-input { width: 100%; resize: none; display: block; }
.dx-dropdownbox .dx-texteditor-input { cursor: pointer; text-overflow: ellipsis; }

/* Бутонът за изчистване се вижда само когато има стойност. */
.dx-clear-button-area { flex: 0 0 auto; width: 30px; height: 30px; display: none; align-items: center;
    justify-content: center; cursor: pointer; }
.dx-texteditor.dx-has-value .dx-clear-button-area { display: flex; }
.dx-icon-clear { width: 18px; height: 18px; border-radius: 50%; background: #999; position: relative; opacity: .8; }
.dx-icon-clear::before, .dx-icon-clear::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 1.5px; background: #fff;
}
.dx-icon-clear::before { transform: translate(-50%, -50%) rotate(45deg); }
.dx-icon-clear::after { transform: translate(-50%, -50%) rotate(-45deg); }
.dx-clear-button-area:hover .dx-icon-clear { opacity: 1; }

/* Стрелката на падащото поле — малкият плътен триъгълник на dx.light. */
.dx-dropdowneditor-button { flex: 0 0 auto; width: 30px; height: 30px; display: flex; align-items: center;
    justify-content: center; cursor: pointer; }
.dx-dropdowneditor-icon { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 4px solid #333; }

/* Падащият панел. */
.dx-dropdowneditor-overlay {
    position: absolute; z-index: 1500; top: calc(100% + 1px); left: 0; right: 0; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .24); border-radius: 0; display: none;
}
.dx-dropdowneditor-active > .dx-dropdowneditor-overlay { display: block; }

/* TagBox: избраните стоят като етикети в самото поле. */
.dx-tag-container { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0;
    padding: 3px 0; cursor: text; }
.dx-tag-container .dx-texteditor-input { padding: 4px 0 5px; }
.dx-tag-content { position: relative; display: inline-block; background: #ddd; color: #333; border-radius: 2px;
    padding: 3px 25px 4px 6px; margin: 0; line-height: 1.3; }
.dx-tag-remove-button { position: absolute; top: 0; right: 0; width: 20px; height: 100%; cursor: pointer; }
.dx-tag-remove-button::before, .dx-tag-remove-button::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 1.5px; background: #333; opacity: .6;
}
.dx-tag-remove-button::before { transform: translate(-50%, -50%) rotate(45deg); }
.dx-tag-remove-button::after { transform: translate(-50%, -50%) rotate(-45deg); }
.dx-tag-remove-button:hover::before, .dx-tag-remove-button:hover::after { opacity: 1; }

.dx-list-item { padding: 7px 10px; cursor: pointer; color: #333; }
.dx-list-item:hover, .dx-list-item.dx-state-focused { background: rgba(0, 0, 0, .04); }
.dx-list-item[hidden] { display: none; }
.dx-empty-message { padding: 7px 10px; color: #999; }

/* Гридът в падащото поле (DataGridSingleSelect): антетка, ред с търсачки, 345px височина. */
.dxs-ddgrid { height: 345px; display: flex; flex-direction: column; }
.dxs-ddgrid-scroll { flex: 1 1 auto; overflow-y: auto; }
.dxs-ddgrid table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dxs-ddgrid th, .dxs-ddgrid td { padding: 7px; border-bottom: 1px solid #ddd; text-align: left;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dxs-ddgrid thead th { color: #959595; font-weight: 400; background: #fff; }
.dxs-ddgrid th + th, .dxs-ddgrid td + td { border-left: 1px solid #ddd; }
.dxs-ddgrid .dxs-filter th { padding: 2px 7px; }
.dxs-ddgrid tbody tr { cursor: pointer; }
.dxs-ddgrid tbody tr:hover td { background: #f5f5f5; }
.dxs-ddgrid tbody tr.dx-selection td { background: #e6e6e6; }
.dxs-search { display: flex; align-items: center; gap: 6px; color: #999; }
.dxs-search input { border: 0; outline: 0; width: 100%; font: inherit; color: #333; background: transparent; padding: 4px 0; }

/* dxButton: бял с рамка; .btn-blue в страницата го оцветява. */
.dx-button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0;
    border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #333; cursor: pointer;
    user-select: none; transition: background-color .15s, border-color .15s;
}
.dx-button:hover { background: #e6e6e6; border-color: #bebebe; }
.dx-button .dx-button-content { padding: 7px 18px 8px; line-height: 1.3; }
.dx-button.dx-state-disabled { opacity: .6; pointer-events: none; }

/* DevExpress.ui.notify — тостът долу в средата. */
.dx-toast-wrapper { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2000;
    display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.dx-toast-content { min-width: 300px; max-width: 568px; padding: 10px 16px 10px 44px; color: #fff; border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25); position: relative; transition: opacity .3s; line-height: 1.4; }
.dx-toast-content::before { content: ""; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; }
.dx-toast-content::after { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px;
    text-align: center; font-weight: 700; font-size: 13px; }
.dx-toast-success { background: #5cb85c; }
.dx-toast-success::after { content: "✓"; }
.dx-toast-error { background: #d9534f; }
.dx-toast-error::after { content: "!"; }
.dx-toast-info { background: #337ab7; }
.dx-toast-info::after { content: "i"; }
.dx-toast-content.is-gone { opacity: 0; }

/* DevExpress.ui.dialog.confirm — бяла завеса, заглавие, текст и бутони Yes/No. */
.dx-dialog-shading { position: fixed; inset: 0; background: rgba(255, 255, 255, .8); z-index: 1900;
    display: flex; align-items: center; justify-content: center; }
.dx-dialog { background: #fff; border: 1px solid #ddd; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); min-width: 385px;
    max-width: 90vw; color: #333; }
.dx-dialog-title { padding: 14px 20px; border-bottom: 1px solid #ddd; font-size: 18px; }
.dx-dialog-content { padding: 20px 20px 24px; }
.dx-dialog-buttons { display: flex; justify-content: center; gap: 10px; padding: 0 20px 20px; }
.dx-dialog-buttons .dx-button { min-width: 100px; }
.dx-dialog-buttons .dx-button:first-child { background: #e6e6e6; border-color: #bebebe; }
