/* Appointment tooltip — layout from wo_console_webview (colors inherit host theme) */

.dx-scheduler-appointment-tooltip-wrapper .dx-overlay-content {
    overflow: hidden;
    width: auto !important;
    max-width: min(420px, 95vw) !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px color-mix(in srgb, currentColor 15%, transparent);
}

.dx-scheduler-appointment-tooltip-wrapper .dx-popup-content {
    overflow: hidden;
    padding: 0;
    width: auto !important;
    max-height: 60vh;
}

.dx-scheduler-appointment-tooltip-wrapper .dx-popup-content .dx-list-item {
    width: auto !important;
    min-width: 320px;
    max-width: min(420px, 95vw) !important;
}

.dx-scheduler-appointment-tooltip-wrapper .dx-popup-content .dx-list-item-content {
    width: 100%;
}

.dx-tooltip-appointment-item {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    padding: 0 !important;
}

.dx-tooltip-appointment-item-marker {
    flex: 0 0 4px;
    width: 4px;
    align-self: stretch;
    padding: 0 !important;
    margin: 0 !important;
}

.dx-tooltip-appointment-item-marker-body {
    width: 4px;
    height: 100%;
    border-radius: 0 !important;
}

.dx-tooltip-appointment-item-content {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    margin: 0 !important;
    overflow: auto !important;
    max-height: 60vh;
    white-space: normal !important;
    text-overflow: unset !important;
}

.wo-tooltip {
    width: 100%;
    min-width: 0;
}

.wo-tooltip-header {
    padding: 12px 14px 10px;
    border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.wo-tooltip-wo {
    display: block;
    font-family: "Cascadia Code", "SF Mono", Consolas, monospace;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.wo-tooltip-desc {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.85;
}

.wo-tooltip-body {
    overflow: hidden;
}

.wo-tooltip-fields {
    margin: 0;
    padding: 6px 0;
    text-align: left;
}

.wo-tooltip-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0 12px;
    padding: 7px 14px;
    border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.wo-tooltip-row:last-child {
    border-bottom: none;
}

.wo-tooltip-row:nth-child(even) {
    background: color-mix(in srgb, currentColor 4%, transparent);
}

.wo-tooltip-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.75;
}

.wo-tooltip-value {
    font-size: 13px;
    word-break: break-word;
}

.wo-tooltip-row.is-highlight .wo-tooltip-label,
.wo-tooltip-row.is-highlight .wo-tooltip-value {
    font-weight: 600;
}

.wo-tooltip-load-more,
.wo-tooltip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px 14px 12px;
    border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.wo-tooltip-load-more {
    justify-content: center;
}

.wo-tooltip-load-more-btn,
.view-wo-btn,
.load-more-btn {
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    color: inherit;
    background: color-mix(in srgb, currentColor 6%, transparent);
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    transition: background 0.15s, border-color 0.15s;
}

.wo-tooltip-load-more-btn:hover,
.view-wo-btn:hover,
.load-more-btn:hover {
    background: color-mix(in srgb, currentColor 12%, transparent);
    border-color: color-mix(in srgb, currentColor 35%, transparent);
}

.displayNone {
    display: none !important;
}

.bold-label {
    font-weight: 600;
}

/* Legacy table tooltip (older renderers) */
.tooltip-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tooltip-label {
    padding: 7px 14px;
    text-align: left;
    width: 130px;
    vertical-align: top;
    font-size: 12px;
    font-weight: 500;
}

.tooltip-value {
    padding: 7px 14px;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
    word-break: break-word;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    text-align: center;
    border-radius: 10px;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: relative;
    top: -20px;
    right: -10px;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#okErrorModal {
    background-color: #337ab7;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
}

#okErrorModal:hover {
    background-color: #286090;
}


#loadIndicatorContainer {
    z-index: 9999999;
    position: fixed;
    top: 50%;
    left: 50%;
}

/*	
#loadIndicatorContainer .dx-loadindicator-segment-inner {
    border-color: #03a9f4 #03a9f4 transparent;
    border-color: #ff5722 #ff5722 transparent;
}
*/
#scheduler .dx-scrollbar-vertical.dx-scrollbar-hoverable {
    width: 13px;
}

#scheduler .dx-scrollbar-vertical .dx-scrollable-scroll {
    width: 13px;
}

#scheduler .dx-scrollbar-horizontal .dx-scrollable-scroll {
    height: 13px;
}

#scheduler .dx-scrollbar-horizontal.dx-scrollbar-hoverable {
    height: 13px;
}

/* Scheduler — spacing & light polish (inherits host app colors) */
#editors-modes {
    gap: 12px 20px;
    padding: 8px 4px 16px;
    margin-bottom: 12px;
}

#editors-modes>.option {
    padding-right: 0 !important;
}

#refresh,
#today {
    padding-right: 0 !important;
}

#scheduler {
    margin-top: 6px;
    min-height: 820px;
}

#scheduler .dx-scheduler-header {
    padding: 8px 10px;
}

#scheduler .dx-scheduler-header-panel-cell {
    padding: 12px 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

#scheduler .dx-scheduler-work-space-month .dx-scheduler-date-table-cell {
    vertical-align: top;
    padding: 0 2px;
}

#scheduler .dx-scheduler-date-table-cell>div {
    padding: 8px 10px 6px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

#scheduler .dx-scheduler-date-table-other-month>div {
    opacity: 0.45;
}

#scheduler .dx-scheduler-date-table-current-date>div {
    font-weight: 700;
}

#scheduler .dx-scheduler-appointment {
    border-radius: 4px !important;
    box-sizing: border-box;
}

#scheduler .dx-scheduler-appointment-content {
    padding: 5px 8px !important;
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#scheduler .dx-scheduler-appointment-content>div>div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#scheduler .dx-scheduler-appointment-collector {
    border-radius: 12px !important;
}

#scheduler .dx-scheduler-appointment-collector-content {
    padding: 4px 10px;
    font-size: 11px;
}

.dx-scheduler-date-table-cell .disable-date {
    opacity: 0.55;
}

@media only screen and (max-width: 1026px) {

    #WO_CALENDAR,
    #M51_cal_body {
        display: none;
    }

    #M51_CalendarNotShowSection {
        display: block;
    }
}

.dx-popup-content.dx-popup-content-scrollable {
    max-height: 45dvh !important;
}

.dx-overlay-content.dx-popup-normal.dx-resizable.dx-popup-inherit-height {
    max-height: fit-content !important;
}

.dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-state-focused {
    background-color: transparent;
    color: inherit;
}

.dx-scheduler-all-day-title,
.dx-scheduler-time-panel,
.dx-scheduler-date-table .dx-scheduler-date-table-row::before,
.dx-scheduler-group-row:before,
.dx-scheduler-header-row:before,
.dx-scheduler-all-day-table-row:before {
    display: none;
}