/* Component Styling Fixes - Match ArchitectUI exactly */

/* Summary Component - Font size matching ArchitectUI */
.grid-menu-2col .widget-chart .widget-numbers {
    font-size: 2rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
}

.grid-menu-2col .widget-chart .widget-subheading {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    color: #6c757d !important;
}

.grid-menu-2col .widget-chart .widget-description {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* DocumentPortfolio Component - Font size matching ArchitectUI */
.grid-menu-3col .widget-chart .widget-numbers {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
}

.grid-menu-3col .widget-chart .widget-subheading {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    margin-bottom: 6px !important;
    color: #6c757d !important;
}

.grid-menu-3col .widget-chart .widget-description {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
}

/* Icon wrapper standardization */
.widget-chart .icon-wrapper {
    width: 50px !important;
    height: 50px !important;
    margin-bottom: 15px !important;
}

.widget-chart .icon-wrapper i {
    font-size: 20px !important;
}

/* Card padding improvements */
.widget-chart {
    padding: 20px 15px !important;
    text-align: center !important;
}

/* Ensure consistent spacing */
.grid-menu .widget-chart-hover {
    min-height: 140px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Visibility helpers for in-place toggling */
.kd-hidden { display: none !important; }
.kd-visible { display: block !important; }
.kd-scroll { overflow: auto !important; }

/* Fixed-size container sizing honors set width/height exactly */
.kd-fixed { box-sizing: border-box !important; }

/* JSON pre styling inside viewer */
.kd-json-pre {
    margin: 0 !important;
    padding: 16px 20px !important;
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Lucida Console', monospace !important;
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    background: #0d1117 !important; /* dark theme */
    color: #c9d1d9 !important;
    border-radius: 8px !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 6px 20px rgba(0,0,0,0.15) !important;
}

/* Simple JSON syntax colors */
.kd-json-pre .str { color: #a5d6ff !important; }
.kd-json-pre .num { color: #f2cc60 !important; }
.kd-json-pre .bool { color: #7ee787 !important; }
.kd-json-pre .null { color: #ff7b72 !important; font-style: italic !important; }
.kd-json-pre .key { color: #79c0ff !important; }

/* Force black header background across full width */
.app-header,
.app-header .app-header__logo,
.app-header .app-header__mobile-menu,
.app-header .app-header__menu,
.app-header .app-header__content {
    background: #000 !important;
}
.app-header, .app-header * { color: #fff !important; }

/* Fix: keep icons visible and colored on hover in 2x2 info buttons */
.btn-icon-vertical:hover .btn-icon-wrapper {
    opacity: 1 !important;
    color: inherit !important;
}

.btn-icon-vertical.btn-transition-text.btn-transition.btn-transition-alt:hover .btn-icon-wrapper {
    opacity: 1 !important;
}

.btn-outline-dark:hover .btn-icon-wrapper,
.btn-outline-danger:hover .btn-icon-wrapper,
.btn-outline-success:hover .btn-icon-wrapper,
.btn-outline-focus:hover .btn-icon-wrapper {
    opacity: 1 !important;
    color: inherit !important;
}

/* Specific icon classes keep color on hover */
.btn-icon-vertical:hover .pe-7s-note2,
.btn-icon-vertical:hover .pe-7s-date,
.btn-icon-vertical:hover .pe-7s-file {
    color: inherit !important;
    opacity: 1 !important;
}

/* Nummer (outline-focus) specific fixes */
.btn-outline-focus:hover {
    background-color: #3f6ad8 !important; /* ArchitectUI focus color */
    border-color: #3f6ad8 !important;
    color: #ffffff !important;
}
.btn-outline-focus:hover .btn-icon-wrapper,
.btn-outline-focus:hover .pe-7s-file {
    opacity: 1 !important;
    color: #ffffff !important;
}
.btn-icon-vertical.btn-transition-text.btn-transition.btn-transition-alt:hover .pe-7s-file {
    opacity: 1 !important;
}
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .grid-menu .widget-chart .widget-numbers {
        font-size: 1.5rem !important;
    }

    .grid-menu .widget-chart .widget-subheading {
        font-size: 0.75rem !important;
    }

    .grid-menu .widget-chart .widget-description {
        font-size: 0.65rem !important;
    }
}

@media (max-width: 576px) {
    .grid-menu .widget-chart .widget-numbers {
        font-size: 1.3rem !important;
    }

    .grid-menu .widget-chart {
        min-height: 120px !important;
        padding: 15px 10px !important;
    }
}

/* =============================== */
/* DataTables presentation polish  */
/* =============================== */

/* Wrapper spacing inside cards */
.dataTables_wrapper {
    padding-top: 6px;
}

/* Top controls: length + search alignment and spacing */
.dataTables_wrapper .dataTables_length label {
    margin-bottom: 0;
}
.dataTables_wrapper .dataTables_filter {
    text-align: right;
}
.dataTables_wrapper .dataTables_filter label {
    margin-bottom: 0;
}
.dataTables_wrapper .dataTables_filter input.form-control {
    max-width: 280px;
    margin-left: 0.5rem;
}

/* Bottom controls: info + pagination alignment */
.dataTables_wrapper .dataTables_info {
    padding-top: .6rem;
    color: #6c757d;
}
.dataTables_wrapper .dataTables_paginate .pagination {
    margin: 0;
}
.dataTables_wrapper .dataTables_paginate .page-item .page-link {
    border-radius: .25rem;
}

/* Table aesthetics */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
}
table.dataTable thead th {
    white-space: nowrap;
}
table.dataTable tbody td.small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 420px;
}

/* Button group spacing from filter */
.dt-buttons {
    margin-right: .75rem;
}

/* Responsive details toggle icon alignment (if enabled) */
table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
    line-height: 1.2;
}
