/* =========================================================
   DOCPROFXML DARK THEME
   unified with com_meetingfeedback
   ========================================================= */

:root {
    --mf-bg: #2b2f33;
    --mf-bg-2: #23272b;
    --mf-card: #34393e;
    --mf-card-2: #3a4046;
    --mf-border: #464c53;

    --mf-text: #e6e6e6;
    --mf-text-muted: #aab0b5;
    --mf-heading: #f4f6f7;

    --mf-accent: #1abc9c;
    --mf-accent-hover: #16a085;

    --mf-danger: #e74c3c;
    --mf-warning: #f39c12;
}

/* =========================================================
   GLOBAL
   ========================================================= */

body,
body.com_docprofxml {
    background: var(--mf-bg) !important;
    color: var(--mf-text) !important;
}

.com_docprofxml {
    background: transparent !important;
    color: var(--mf-text) !important;
}

.com_docprofxml a {
    color: #6ecbff;
    text-decoration: none;
}

.com_docprofxml a:hover,
.com_docprofxml a:focus {
    color: #9fe1ff;
    text-decoration: underline;
}

.com_docprofxml h1,
.com_docprofxml h2,
.com_docprofxml h3,
.com_docprofxml h4,
.com_docprofxml h5,
.com_docprofxml h6 {
    color: var(--mf-heading) !important;
}

.com_docprofxml small,
.com_docprofxml .small,
.com_docprofxml .text-muted,
.com_docprofxml .form-text,
.com_docprofxml .help-block {
    color: var(--mf-text-muted) !important;
}

.com_docprofxml hr {
    border-top: 1px solid var(--mf-border) !important;
    border-bottom: 0 !important;
}

/* =========================================================
   JOOMLA / HEADER / NAVBAR
   ========================================================= */

.container-header,
.header,
.header .container-header,
.bg-primary,
.navbar,
.navbar.bg-primary,
.navbar.navbar-expand-lg,
header .navbar {
    background: var(--mf-bg) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--mf-border) !important;
    box-shadow: none !important;
}

.container-header::before,
.container-header::after {
    display: none !important;
}

.navbar .nav-link,
.navbar-nav .nav-link {
    color: var(--mf-text) !important;
}

.navbar .nav-link:hover,
.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.05) !important;
    border-radius: 4px;
}

.navbar .nav-item.active .nav-link,
.navbar .nav-link.active {
    color: #ffffff !important;
    background: rgba(26, 188, 156, 0.15) !important;
    border-radius: 4px;
}

.navbar .dropdown-menu {
    background: var(--mf-card) !important;
    border-color: var(--mf-border) !important;
}

.navbar .dropdown-item {
    color: var(--mf-text) !important;
}

.navbar .dropdown-item:hover {
    background: var(--mf-card-2) !important;
    color: #ffffff !important;
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */

.com_docprofxml .breadcrumb {
    background: transparent !important;
    border: 0 !important;
    color: var(--mf-text-muted) !important;
}

.com_docprofxml .breadcrumb > li,
.com_docprofxml .breadcrumb > li.active {
    color: var(--mf-text-muted) !important;
}

.com_docprofxml .breadcrumb > li + li:before {
    color: var(--mf-text-muted) !important;
}

/* =========================================================
   CARDS / PANELS / BOXES / GENERIC WRAPPERS
   ========================================================= */

.com_docprofxml .card,
.com_docprofxml .card-header,
.com_docprofxml .card-body,
.com_docprofxml .card-footer,
.com_docprofxml .panel,
.com_docprofxml .panel-heading,
.com_docprofxml .panel-body,
.com_docprofxml .panel-footer,
.com_docprofxml .well,
.com_docprofxml .box,
.com_docprofxml .adminform,
.com_docprofxml .list-group-item,
.com_docprofxml .modal-content,
.com_docprofxml .dropdown-menu,
.com_docprofxml .bg-white,
.com_docprofxml .bg-light {
    background: var(--mf-card) !important;
    color: var(--mf-text) !important;
    border-color: var(--mf-border) !important;
    box-shadow: none !important;
}

/* =========================================================
   TABS
   ========================================================= */

.com_docprofxml .nav-tabs {
    border-color: var(--mf-border) !important;
}

.com_docprofxml .nav-tabs .nav-link,
.com_docprofxml .nav-tabs > li > a {
    background: var(--mf-card-2) !important;
    color: var(--mf-text-muted) !important;
    border: 1px solid var(--mf-border) !important;
    margin-right: 4px;
}

.com_docprofxml .nav-tabs .nav-link.active,
.com_docprofxml .nav-tabs > li.active > a,
.com_docprofxml .nav-tabs > li.active > a:hover,
.com_docprofxml .nav-tabs > li.active > a:focus {
    background: var(--mf-accent) !important;
    color: #081311 !important;
    border-color: var(--mf-accent) !important;
}

/* =========================================================
   TABLES
   ========================================================= */

.com_docprofxml table,
.com_docprofxml .table {
    color: var(--mf-text) !important;
    border-color: var(--mf-border) !important;
    background: transparent !important;
}

.com_docprofxml table th,
.com_docprofxml table td,
.com_docprofxml .table th,
.com_docprofxml .table td {
    background: #2f3439 !important;
    color: var(--mf-text) !important;
    border-color: var(--mf-border) !important;
}

.com_docprofxml table thead th,
.com_docprofxml .table thead th {
    background: #394047 !important;
    color: var(--mf-heading) !important;
    border-color: var(--mf-border) !important;
}

.com_docprofxml .table > :not(caption) > * > * {
    background-color: transparent;
    color: inherit;
    border-bottom-color: var(--mf-border) !important;
}

.com_docprofxml .table-hover > tbody > tr:hover > *,
.com_docprofxml table tbody tr:hover > td,
.com_docprofxml table tbody tr:hover > th {
    background: #383e44 !important;
    color: var(--mf-heading) !important;
}

.com_docprofxml .table-striped > tbody > tr:nth-of-type(odd) > * {
    background: #31363b !important;
    color: var(--mf-text) !important;
}

.com_docprofxml .table tbody tr.selected,
.com_docprofxml .table tbody tr.is-selected {
    background: rgba(26, 188, 156, 0.15) !important;
}

/* =========================================================
   FORMS
   ========================================================= */

.com_docprofxml .form-control,
.com_docprofxml .form-select,
.com_docprofxml textarea,
.com_docprofxml input[type="text"],
.com_docprofxml input[type="search"],
.com_docprofxml input[type="number"],
.com_docprofxml input[type="email"],
.com_docprofxml input[type="password"],
.com_docprofxml input[type="tel"],
.com_docprofxml input[type="url"],
.com_docprofxml input[type="date"],
.com_docprofxml select,
.com_docprofxml .inputbox {
    background: var(--mf-bg-2) !important;
    color: var(--mf-text) !important;
    border: 1px solid var(--mf-border) !important;
    box-shadow: none !important;
}

.com_docprofxml .form-control::placeholder,
.com_docprofxml textarea::placeholder,
.com_docprofxml input::placeholder {
    color: #8a9096 !important;
}

.com_docprofxml .form-control:focus,
.com_docprofxml .form-control:active,
.com_docprofxml .form-select:focus,
.com_docprofxml .form-select:active,
.com_docprofxml textarea:focus,
.com_docprofxml textarea:active,
.com_docprofxml input[type="text"]:focus,
.com_docprofxml input[type="search"]:focus,
.com_docprofxml input[type="number"]:focus,
.com_docprofxml input[type="email"]:focus,
.com_docprofxml input[type="password"]:focus,
.com_docprofxml input[type="tel"]:focus,
.com_docprofxml input[type="url"]:focus,
.com_docprofxml input[type="date"]:focus,
.com_docprofxml select:focus {
    background: #ffffff !important;
    color: #1f2327 !important;
    border-color: var(--mf-accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(26,188,156,.2) !important;
}

.com_docprofxml .form-control:disabled,
.com_docprofxml .form-control[readonly],
.com_docprofxml .form-select:disabled,
.com_docprofxml textarea:disabled,
.com_docprofxml textarea[readonly],
.com_docprofxml input:disabled,
.com_docprofxml select:disabled {
    background: #3a4046 !important;
    color: var(--mf-text-muted) !important;
    border-color: var(--mf-border) !important;
    opacity: 1 !important;
}

.com_docprofxml label,
.com_docprofxml .form-label,
.com_docprofxml .col-form-label {
    color: var(--mf-text-muted) !important;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.com_docprofxml .btn-primary,
.com_docprofxml .btn-success {
    background: var(--mf-accent) !important;
    border-color: var(--mf-accent) !important;
    color: #081311 !important;
}

.com_docprofxml .btn-primary:hover,
.com_docprofxml .btn-success:hover,
.com_docprofxml .btn-primary:focus,
.com_docprofxml .btn-success:focus {
    background: var(--mf-accent-hover) !important;
    border-color: var(--mf-accent-hover) !important;
    color: #081311 !important;
}

.com_docprofxml .btn,
.com_docprofxml .btn-default,
.com_docprofxml .btn-secondary,
.com_docprofxml .btn-outline-secondary,
.com_docprofxml .btn-outline-primary {
    background: var(--mf-card-2) !important;
    border-color: var(--mf-border) !important;
    color: var(--mf-text) !important;
    box-shadow: none !important;
}

.com_docprofxml .btn:hover,
.com_docprofxml .btn-default:hover,
.com_docprofxml .btn-secondary:hover,
.com_docprofxml .btn-outline-secondary:hover,
.com_docprofxml .btn-outline-primary:hover {
    background: #383e44 !important;
    color: #ffffff !important;
}

.com_docprofxml .btn-danger {
    background: var(--mf-danger) !important;
    border-color: var(--mf-danger) !important;
    color: #fff !important;
}

/* =========================================================
   BADGES
   ========================================================= */

.com_docprofxml .badge {
    background: var(--mf-card-2) !important;
    color: var(--mf-text) !important;
}

.com_docprofxml .badge.bg-primary,
.com_docprofxml .badge.text-bg-primary,
.com_docprofxml .docprof-article .badge.text-bg-primary {
    background: var(--mf-accent) !important;
    color: #081311 !important;
}

/* =========================================================
   ALERTS
   ========================================================= */

.com_docprofxml .alert {
    border-color: var(--mf-border) !important;
    background: var(--mf-card) !important;
    color: var(--mf-text) !important;
}

.com_docprofxml .alert-warning {
    background: rgba(243, 156, 18, 0.18) !important;
    color: #ffd089 !important;
    border-color: rgba(243, 156, 18, 0.35) !important;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.com_docprofxml .pagination > li > a,
.com_docprofxml .pagination > li > span {
    background: var(--mf-card-2) !important;
    border: 1px solid var(--mf-border) !important;
    color: var(--mf-text) !important;
}

.com_docprofxml .pagination > li > a:hover,
.com_docprofxml .pagination > li > span:hover {
    background: #383e44 !important;
    color: #fff !important;
}

.com_docprofxml .pagination > .active > a,
.com_docprofxml .pagination > .active > span,
.com_docprofxml .pagination > .active > a:hover,
.com_docprofxml .pagination > .active > span:hover {
    background: var(--mf-accent) !important;
    border-color: var(--mf-accent) !important;
    color: #081311 !important;
}

/* =========================================================
   DETAILS / SPOILERS / ARTICLE
   ========================================================= */

.com_docprofxml .docprof-article {
    background: transparent !important;
    color: var(--mf-text) !important;
}

.com_docprofxml .docprof-article .meta,
.com_docprofxml .docprof-article p.meta {
    color: var(--mf-text-muted) !important;
}

.com_docprofxml .content,
.com_docprofxml .related-articles,
.com_docprofxml .related-anchors,
.com_docprofxml .docprof-fav {
    background: transparent !important;
    color: var(--mf-text) !important;
}

/* критично: перебити світлі details зі template */
.com_docprofxml details.docprof-spoiler,
.com_docprofxml details.docprof-edit-spoiler {
    border: 1px solid var(--mf-border) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    background: var(--mf-card) !important;
    color: var(--mf-text) !important;
    box-shadow: none !important;
}

.com_docprofxml details.docprof-spoiler > summary,
.com_docprofxml details.docprof-edit-spoiler > summary {
    cursor: pointer !important;
    font-weight: 600 !important;
    list-style: none !important;
    color: var(--mf-heading) !important;
    background: transparent !important;
}

.com_docprofxml details.docprof-spoiler > summary::-webkit-details-marker,
.com_docprofxml details.docprof-edit-spoiler > summary::-webkit-details-marker {
    display: none !important;
}

.com_docprofxml .docprof-edit-spoiler .edit-content-form,
.com_docprofxml .docprof-edit-spoiler .edit-metakey-form {
    background: transparent !important;
    color: var(--mf-text) !important;
}

/* div-и всередині спойлера */
.com_docprofxml .docprof-edit-spoiler div,
.com_docprofxml .docprof-spoiler div {
    color: inherit;
}

/* inline-styled wrappers from template */
.com_docprofxml .docprof-edit-spoiler[style],
.com_docprofxml .docprof-spoiler[style] {
    background: var(--mf-card) !important;
    border-color: var(--mf-border) !important;
    color: var(--mf-text) !important;
}

.com_docprofxml .docprof-edit-spoiler summary span.text-muted {
    color: var(--mf-text-muted) !important;
}

/* fav helpers from template inline style block */
.com_docprofxml .docprof-article .fav-badge .fav-remove {
    font-weight: bold;
    opacity: .9;
    color: #081311 !important;
}

.com_docprofxml .docprof-article .fav-badge .fav-remove:hover {
    opacity: 1;
    color: #081311 !important;
}

.com_docprofxml .docprof-article .fav-group {
    margin-left: 0;
    border-left: 2px dashed var(--mf-border) !important;
    padding-left: 10px;
    margin-bottom: 6px;
}

.com_docprofxml .docprof-article .fav-group.level-0 {
    border-left: 0 !important;
    padding-left: 0;
}

.com_docprofxml .docprof-article .fav-group-title {
    color: var(--mf-text-muted) !important;
}

.com_docprofxml .docprof-article .fav-children {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

/* related tables */
.com_docprofxml .related-articles table,
.com_docprofxml .related-anchors table {
    margin-top: 8px;
}

/* =========================================================
   ARTICLE VIEW HARD OVERRIDES
   ========================================================= */

body.com_docprofxml.view-article,
.com_docprofxml.view-article,
.com_docprofxml.view-article #content,
.com_docprofxml.view-article main,
.com_docprofxml.view-article .component-content,
.com_docprofxml.view-article .com-content-article,
.com_docprofxml.view-article .item-page,
.com_docprofxml.view-article .docprof-article {
    background: var(--mf-bg) !important;
    color: var(--mf-text) !important;
}

/* outer wrappers */
.com_docprofxml.view-article .container,
.com_docprofxml.view-article .container-fluid,
.com_docprofxml.view-article .row,
.com_docprofxml.view-article [class*="col-"],
.com_docprofxml.view-article .span12,
.com_docprofxml.view-article .span9,
.com_docprofxml.view-article .span8,
.com_docprofxml.view-article .span6,
.com_docprofxml.view-article .span4,
.com_docprofxml.view-article .span3 {
    background: transparent !important;
    color: var(--mf-text) !important;
}

/* forms and blocks inside article */
.com_docprofxml.view-article form,
.com_docprofxml.view-article fieldset,
.com_docprofxml.view-article .adminform,
.com_docprofxml.view-article .edit-content-form,
.com_docprofxml.view-article .edit-metakey-form,
.com_docprofxml.view-article .related-articles,
.com_docprofxml.view-article .related-anchors,
.com_docprofxml.view-article .docprof-fav,
.com_docprofxml.view-article .content {
    background: transparent !important;
    color: var(--mf-text) !important;
}

/* specifically beat inline max-width blocks */
.com_docprofxml.view-article .edit-content-form .mb-2,
.com_docprofxml.view-article .edit-metakey-form .input-group,
.com_docprofxml.view-article .edit-metakey-form .form-check {
    background: transparent !important;
    color: var(--mf-text) !important;
}

/* summary/open state */
.com_docprofxml details[open] {
    background: var(--mf-card) !important;
}

/* input group text */
.com_docprofxml .input-group-text {
    background: var(--mf-card-2) !important;
    color: var(--mf-text) !important;
    border-color: var(--mf-border) !important;
}

/* code snippets */
.com_docprofxml code,
.com_docprofxml pre {
    background: var(--mf-bg-2) !important;
    color: var(--mf-text) !important;
    border-color: var(--mf-border) !important;
}

/* =========================================================
   CHECKBOXES
   ========================================================= */

.com_docprofxml .form-check-input {
    background: var(--mf-bg-2) !important;
    border-color: var(--mf-border) !important;
}

.com_docprofxml .form-check-input:checked {
    background-color: var(--mf-accent) !important;
    border-color: var(--mf-accent) !important;
}

/* =========================================================
   DROPDOWNS
   ========================================================= */

.com_docprofxml .dropdown-menu {
    background: var(--mf-card) !important;
    border-color: var(--mf-border) !important;
}

.com_docprofxml .dropdown-item {
    color: var(--mf-text) !important;
}

.com_docprofxml .dropdown-item:hover,
.com_docprofxml .dropdown-item:focus {
    background: var(--mf-card-2) !important;
    color: #ffffff !important;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #2b2f33;
}

::-webkit-scrollbar-thumb {
    background: #4a5158;
    border-radius: 6px;
    border: 2px solid #2b2f33;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a636c;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #4a5158 #2b2f33;
}


.com_docprofxml .docprof-edit-spoiler .edit-content-form .mb-2,
.com_docprofxml .docprof-edit-spoiler .edit-content-form .form-control,
.com_docprofxml .docprof-edit-spoiler .edit-content-form textarea {
    width: 100% !important;
    max-width: 100% !important;
}

#fulltext {
    height: auto !important;
    min-height: 80px !important; /* ≈ 4 рядки */
    max-height: none !important;
}