﻿/* custom Facturavi CSS */

/* Fix navigation jump when active - compensate for 4px border-left */
#side-menu > li {
    border-left: 4px solid transparent;
}
@font-face {
    font-family: 'Open Sans';
    src: url('/fonts/OpenSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.MsoNormal {
    all: unset;
}

.checkbox-large {
    width: 20px;
    height: 20px;
}

.form-switch {
    padding-top: 6px;
}

.tabs-container.facturavi .tabs-left > .nav-tabs > li > a {
    padding: 6px 16px 4px 6px;
    margin-bottom: 0px;
}

hr.hr-line-dashed {
    margin: 4px 0;
}

.tabs-container.facturavi .tabs-left > .nav-tabs {
    width: 14%;
}

.tabs-container.facturavi .tabs-left .panel-body {
    width: 86%;
    margin-left: 14%;
}

.form-control {
    padding: 3px 7px;
    line-height: 1.3em;
    font-size: 0.85rem;
    height: calc(2rem + 2px);
}

.form-control-label {
    font-weight: bold;
    text-transform:uppercase;
    font-size: 10px;
}

.tabs-container .panel-body {
    padding: 18px;
}

.ibox-title {
    padding: 15px 15px 8px 15px;
}

.card-facturavi {
    margin-top: 15px;
    margin-bottom: 15px;
}

    .card-facturavi .card-header {
        align-items: center;
        font-size: larger;
        font-weight: 600;
    }

        .card-facturavi .card-header .row {
            align-items: center;
        }

        .card-facturavi .card-header .btn {
            font-size: small;
        }

.panel-body .table {
    margin-bottom: 0;
}

.col-form-label {
    user-select: none;
    font-weight: 600;
}

#vennootschapToggles .col-form-label {
    cursor: pointer;
}

.nav.nav-tabs:not(.facturavi-tabs) li a.nav-link {
    padding: 10px 20px 10px 25px;
}

.nav.nav-tabs:not(.facturavi-tabs) li a.nav-link.active {
    background-color: whitesmoke !important;
}

.facturavi-tabs li > a {
    border-radius: 2px 0 0 2px;
}

    .facturavi-tabs li > a:nth-child(odd) {
        background-color: #f9f9f9;
    }

.facturavi-tabs li > .nav-link.active {
    background-color: #e7eaec !important;
    color: #2f4050;
    border-color: none;
}

:: -webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 8px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }


.success {
    color: #1ab394 !important;
}

.danger {
    color: #ed5666 !important;
}

table.dataTable tbody > tr.selected, table.dataTable tbody > tr > .selected {
    background-color: #e7eaec;
}

table.dataTable tbody td.select-checkbox:before, table.dataTable tbody td.select-checkbox:after, table.dataTable tbody th.select-checkbox:before, table.dataTable tbody th.select-checkbox:after {
    display: block;
    position: absolute;
    top: 26px;
    left: 50%;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
}

table.dataTable thead, th {
    background-color: #EFEFEF;
}


table.dataTable tr.selected td.select-checkbox:after, table.dataTable tr.selected th.select-checkbox:after {
    content: '\2714';
    margin-top: -11px;
    margin-left: -6px;
    font-size: 18px;
    text-align: center;
    text-shadow: none;
}

table.dataTable tbody td.select-checkbox:before, table.dataTable tbody th.select-checkbox:before {
    content: ' ';
    margin-top: -6px;
    margin-left: -6px;
    border: 1px solid #989898;
    border-radius: 3px;
}

table.dataTable tbody td {
    vertical-align: middle;
}

.actionButton {
    background-color: #ebe8e8;
    color: #425664;
}

    .actionButton:hover {
        background-color: #AA7979;
        color: whitesmoke;
    }

.page-heading {
    padding-right: 25px;
}

/* center data & header in datatables.NET*/
th.dt-center, td.dt-center {
    text-align: center;
}

th.dtTitle {
    font-style: normal;
    font-weight: 800;
}

.dtTitle {
    font-weight: 600;
    font-style: initial;
}

th {
    text-transform: lowercase;
}

.highlighted-day {
    background-color: #eeffde !important;
}

.highlighted-weekend {
    background-color: #F0F0F0 !important;
}

.highlighted-checked {
    background-color: lightgreen !important;
    border-width: 1px;
    border-style: solid;
}

/* Make sure tables remain inside the modal */
.fitTable {
    display: table; /* This is important */
}

.intracommunautair {
    background-color: #f7cfd3 !important;
}

.statusBadge {
    min-width: 50px;
    color: white;
    font-weight: bold;
}

.padright-15 {
    padding-right: 15px;
}

.timeline-bordered {
    border-top: 1px solid #e7eaec;
    border-bottom: 1px solid #e7eaec;
    border-left: 1px solid #e7eaec;
    background: #f8f8f8;
    width: 30px;
    padding: 5px;
    font-weight: 500;
    text-align: center;
    max-height: 25px;
}

.saveOnTop {
    margin-top: 17px;
    background-color: white !important;
    padding-bottom: 15px;
    height: 49px;
    margin-left: 100px;
    padding-right: 30px !important;
}

/* MudSelect/MudMenu dropdown offset for sidebar - NOT in dialogs/modals, NOT on mobile */
@media (min-width: 769px) {
    .mud-popover.mud-popover-anchor-bottom-left:not(.mud-picker-popover):not(.mud-overlay-content *):not(.mud-dialog *),
    .mud-popover.mud-popover-anchor-bottom-right:not(.mud-picker-popover):not(.mud-overlay-content *):not(.mud-dialog *) {
        transform: translateX(-275px) !important;
    }

    body.mini-navbar .mud-popover.mud-popover-anchor-bottom-left:not(.mud-picker-popover):not(.mud-overlay-content *):not(.mud-dialog *),
    body.mini-navbar .mud-popover.mud-popover-anchor-bottom-right:not(.mud-picker-popover):not(.mud-overlay-content *):not(.mud-dialog *) {
        transform: translateX(0px) !important;
    }
}

/* Mobile: NO offset (sidebar hidden) */
@media (max-width: 768px) {
    .mud-popover.mud-popover-anchor-bottom-left:not(.mud-picker-popover):not(.mud-overlay-content *):not(.mud-dialog *),
    .mud-popover.mud-popover-anchor-bottom-right:not(.mud-picker-popover):not(.mud-overlay-content *):not(.mud-dialog *) {
        transform: translateX(0px) !important;
    }
}

/* MudSelect/MudMenu dropdown in dialogs - NO offset (all screen sizes) */
.mud-dialog .mud-popover.mud-popover-anchor-bottom-left:not(.mud-picker-popover),
.mud-dialog .mud-popover.mud-popover-anchor-bottom-right:not(.mud-picker-popover),
.mud-overlay-content .mud-popover.mud-popover-anchor-bottom-left:not(.mud-picker-popover),
.mud-overlay-content .mud-popover.mud-popover-anchor-bottom-right:not(.mud-picker-popover) {
    transform: translateX(0px) !important;
}


/* MudDatePicker popover offset for sidebar */
.mud-picker-popover.mud-popover {
    transform: translateX(0px) !important;
}

body.mini-navbar .mud-picker-popover.mud-popover {
    transform: translateX(0px) !important;
}

/* Person selection menu in checklist items - ensure proper width */
.person-menu-list {
    min-width: 180px !important;
}

.person-menu-list .mud-list-item {
    white-space: nowrap;
}

/* Calendar Styles */
.calendar-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #f5f5f5;
    position: relative;
    z-index: 10;
}

.calendar-day-header {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid #e0e0e0;
    font-size: 0.875rem;
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 120px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px;
    position: relative;
    background-color: white;
    overflow: hidden;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day.other-month {
    background-color: #fafafa;
    color: #999;
}

.calendar-day.today {
    background-color: #e3f2fd;
}

.calendar-day.today .day-number {
    background-color: #1976d2;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    position: relative;
}

.day-number {
    font-weight: 600;
    font-size: 0.875rem;
}

.hours-badge {
    font-size: 0.6rem;
    margin-right: 25px;
    margin-top: 15px;
}

.day-content {
    font-size: 0.75rem;
}

.day-content .mud-tooltip-root {
    display: block;
    width: 100%;
}

.ticket-item {
    margin-bottom: 2px;
    padding: 2px 4px 2px 8px;
    background-color: #e3f2fd;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-left: 4px solid #1976d2;
    display: block;
    width: 100%;
}

.ticket-item.ticket-status-tck_nieuw {
    border-left-color: #1976d2;
}

.ticket-item.ticket-status-tck_progress {
    border-left-color: #fb8c00;
}

.ticket-item.ticket-status-tck_waitfeedback {
    border-left-color: #0288d1;
}

.ticket-item.ticket-status-tck_nicetohave {
    border-left-color: #9e9e9e;
}

.ticket-item.ticket-status-tck_closed {
    border-left-color: #66bb6a;
}

.ticket-item:hover {
    background-color: #bbdefb;
}

/* Ticket modal positioning - avoid sidebar */
.mud-dialog-container:has(.mud-dialog):not(:has(.mud-popover)) {
    margin-left: 265px;
    max-width: calc(100vw - 265px);
}

body.mini-navbar .mud-dialog-container:has(.mud-dialog):not(:has(.mud-popover)) {
    margin-left: -5px;
    max-width: calc(100vw + 5px);
}

/* Ticket tooltip styling - reset any positioning from dialog container */
.mud-popover-provider .mud-popover.mud-tooltip {
    transform: translate(-275px, -5px) !important;
}

.mud-tooltip .mud-popover {
    transform: translate(-275px, -5px) !important;
}

body.mini-navbar .mud-popover-provider .mud-popover.mud-tooltip,
body.mini-navbar .mud-tooltip .mud-popover {
    transform: translate(0px, -5px) !important;
}

/* Card-style tooltip */
.ticket-tooltip-card {
    min-width: 250px;
    max-width: 350px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.ticket-tooltip-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Header colors based on status */
.ticket-header-status-tck_nieuw {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.ticket-header-status-tck_progress {
    background: linear-gradient(135deg, #fb8c00 0%, #f57c00 100%);
}

.ticket-header-status-tck_waitfeedback {
    background: linear-gradient(135deg, #0288d1 0%, #0277bd 100%);
}

.ticket-header-status-tck_nicetohave {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
}

.ticket-header-status-tck_closed {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
}

.ticket-tooltip-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-tooltip-body {
    padding: 10px 12px;
}

.ticket-tooltip-section {
    margin-bottom: 8px;
}

.ticket-tooltip-section:last-child {
    margin-bottom: 0;
}

.ticket-tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.ticket-tooltip-row:last-child {
    margin-bottom: 0;
}

.ticket-tooltip-label {
    color: #666;
    font-weight: 500;
    margin-right: 12px;
}

.ticket-tooltip-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

.ticket-tooltip-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

/* Priority colors in tooltip */
.ticket-priority-low {
    color: #66bb6a;
}

.ticket-priority-medium {
    color: #29b6f6;
}

.ticket-priority-high {
    color: #fb8c00;
}

.ticket-priority-blocking {
    color: #f44336;
    font-weight: 700;
}

/* Status colors in tooltip */
.ticket-status-value-tck_nieuw {
    color: #1976d2;
}

.ticket-status-value-tck_progress {
    color: #fb8c00;
}

.ticket-status-value-tck_waitfeedback {
    color: #0288d1;
}

.ticket-status-value-tck_nicetohave {
    color: #9e9e9e;
}

.ticket-status-value-tck_closed {
    color: #66bb6a;
}

/* Calendar tooltip styles (shared by ProjectOpvolging and Checklist) */
.calendar-tooltip-card {
    min-width: 220px;
    max-width: 300px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.calendar-tooltip-header {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.calendar-tooltip-header.header-open {
    background: linear-gradient(135deg, #fb8c00 0%, #f57c00 100%);
}

.calendar-tooltip-header.header-closed {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
}

.calendar-tooltip-header.header-overdue {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
}

.calendar-tooltip-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-tooltip-body {
    padding: 10px 12px;
}

.calendar-tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.calendar-tooltip-row:last-child {
    margin-bottom: 0;
}

.calendar-tooltip-label {
    color: #666;
    font-weight: 500;
    margin-right: 12px;
}

.calendar-tooltip-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

.calendar-tooltip-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.calendar-tooltip-value.status-open {
    color: #fb8c00;
}

.calendar-tooltip-value.status-closed {
    color: #66bb6a;
}

.calendar-tooltip-value.status-overdue {
    color: #ef5350;
}

/* Remove extra margin from form-group in filter panels */
.mud-grid .form-group {
    margin-bottom: 0 !important;
}

/* Consistent table cell height and dense mode as default for all tables */
.mud-table-cell {
    height: 45px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Apply to headers as well */
.mud-table-head .mud-table-cell {
    height: 32px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    background-color: #EFEFEF;
    font-weight: bold !important;
    font-size: 13px !important;
}

/* ============================================ */
/* Checklist Feature Styling */
/* ============================================ */

/* Checklist Tab Container */
.checklist-tab {
    background-color: var(--mud-palette-background);
}

/* Checklist Items List */
.checklist-items {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* Individual Checklist Item Row */
.checklist-item {
    transition: background-color 0.2s ease;
    border-radius: 4px;
    padding: 4px 0;
}

.checklist-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Completed Item Styling */
.checklist-item-text {
    flex: 1;
}

.checklist-item-completed {
    text-decoration: line-through;
    opacity: 0.6;
    color: var(--mud-palette-text-secondary);
}

/* Drag Handle */
.drag-handle {
    cursor: grab;
    opacity: 0.3;
    transition: opacity 0.2s ease;
    color: var(--mud-palette-text-secondary);
}

.checklist-item:hover .drag-handle {
    opacity: 0.7;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Indent/Outdent Buttons */
.indent-btn, .outdent-btn {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
}

/* Progress Bar */
.checklist-tab .mud-progress-linear {
    height: 8px;
    border-radius: 4px;
}

/* Add Item Input */
.checklist-tab .mud-input-root {
    margin-top: 8px;
}

/* Remove border above table pager */
.mud-table-pagination-toolbar {
    border-top: none !important;
}

/* Table action buttons styling - match old actionButton style */
.mud-table .mud-button-root.mud-icon-button.mud-button-filled.mud-button-filled-default {
    background-color: #ebe8e8;
    color: #425664;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.mud-table .mud-button-root.mud-icon-button.mud-button-filled.mud-button-filled-default:hover {
    background-color: #AA7979;
    color: whitesmoke;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

/* Compact dialog height for simple forms - applied to dialog background */
.dialog-compact-height .mud-dialog {
    max-height: 50vh !important;
    min-height: auto !important;
}

.dialog-compact-height .mud-dialog .standard-detail-dialog {
    min-height: auto !important;
}

.dialog-compact-height .mud-dialog .mud-dialog-content {
    max-height: 30vh !important;
    overflow-y: auto !important;
}

/* ============================================ */
/* Bijlage (Attachment) Component Styles */
/* ============================================ */

/* Drag & Drop Zone */
.bijlage-dropzone {
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    background-color: transparent;
    cursor: pointer;
    position: relative;
}

.bijlage-dropzone:hover {
    border-color: var(--mud-palette-primary);
    background-color: rgba(var(--mud-palette-primary-rgb), 0.04);
}

.bijlage-dropzone.dragging {
    border-color: var(--mud-palette-primary);
    border-style: solid;
    background-color: rgba(var(--mud-palette-primary-rgb), 0.08);
}

/* Compact List Layout */
.bijlage-list {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.bijlage-row {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background-color 0.15s;
}

.bijlage-row:last-child {
    border-bottom: none;
}

.bijlage-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.bijlage-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.bijlage-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.bijlage-filename {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bijlage-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Action Buttons */
.bijlage-action-btn {
    border-radius: 4px;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 4px !important;
}

.bijlage-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.08) !important;
}
