﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/*Toaster style from theme */

#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 250px;
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
    font-family: Arial, sans-serif;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease-in-out;
    background-repeat: no-repeat;
}

    .toast.show {
        opacity: 1;
        transform: translateX(0);
    }

    .toast.success {
        background-color: #3ac47d;
        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==) !important;
    }

    .toast.info {
        background-color: #16aaff;
        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=) !important;
    }

    .toast.error {
        background-color: #d92550;
        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=) !important;
    }

    .toast.warning {
        background-color: #f7b924;
        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=) !important;
    }

    .toast .close-btn {
        position: absolute;
        top: 8px;
        right: 10px;
        color: #fff;
        font-size: 18px;
        font-weight: bold;
        cursor: pointer;
        line-height: 1;
    }


/* Color picker inside the textbox (minimal) */
.customColorInput {
    position: relative;
}

    .customColorInput .customColorInput__text-input {
        padding-right: 2.5rem; /* room for the picker */
    }

    .customColorInput .customColorInput__select-input {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        width: 22px;
        height: 22px;
        padding: 0;
        border: 1px solid rgba(0,0,0,.15);
        border-radius: 50%;
        cursor: pointer;
        background-color: var(--picker-color, transparent);
    }

    /* Keep text read-only feel; picker still clickable */
    .customColorInput.isReadOnly .customColorInput__text-input {
        cursor: not-allowed;
    }

    .customColorInput.isReadOnly .customColorInput__select-input {
        cursor: pointer;
    }

/* form file input */

.logo-canvas {
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
}

    .logo-canvas:hover {
        border-color: #0d6efd;
    }

.upload-icon {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #6c757d;
    pointer-events: none;
}

.image-upload-container {
    position: relative;
    display: inline-block;
}
#btnFullScreen svg {
    cursor: pointer;
}

/*notification-icon*/
.notification-menu_content li.list-item:hover a.bi-envelope-fill, 
.notification-menu_content li.list-item:hover a.bi-envelope-open{
    color: #fff !important;
    opacity:.8;
}

    .notification-menu_content li.list-item:hover a.bi-envelope-fill :before ,
    .notification-menu_content li.list-item:hover a.bi-envelope-open:before {
        color: #fff !important;
    }

.history-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    transition: right .35s cubic-bezier(.25, .8, .25, 1);
    z-index: 5000;
    display: flex;
    flex-direction: column;
}

    .history-panel.open {
        right: 0;
    }

.history-body {
    overflow-y: auto;
    height: calc(100vh - 60px);
}

/* ✅ Read-only mode cursor styling with hardware acceleration */
input:disabled,
textarea:disabled,
select:disabled,
.select2-container.select2-container--disabled,
.select2-container--disabled .select2-selection {
    cursor: not-allowed !important;
}

/* ✅ Read-only notice */
.readonly-notice {
    border-left: 3px solid #ffc107;
}

/* ✅ Navigation footer */
#approvalNavFooter {
    background-color: #f8f9fa;
    position: relative;
    z-index: 1000;
}

    #approvalNavFooter button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* === Added: universal pointer cursor for all checkboxes === */
input[type="checkbox"],
.form-check-input {
    cursor: pointer !important;
}

/* (Optional UX) Keep chip remove icon visually consistent in normal state too */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    display: flex;
    align-items: center;
    padding: 0 4px;
}

/* ✅ Hide original footers in approval mode */
[data-approval-mode="true"] .card-footer:not(#approvalNavFooter) {
    display: none !important;
}

/* === Added: show remove (×) icon in disabled multiselect chips during read-only approval mode === */
[data-approval-mode="true"] .select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove {
    display: flex !important;
    pointer-events: none;
    cursor: not-allowed;
    opacity: .6;
}

/* ✅ In approval mode, show not-allowed cursor for all checkboxes (overrides universal pointer) */
[data-approval-mode="true"] input[type="checkbox"],
[data-approval-mode="true"] .form-check-input {
    cursor: not-allowed !important;
}

/* ✅ Optimize rendering with hardware acceleration */
.tab-pane {
    will-change: contents;
}

/* ✅ Hide action columns in read-only mode */
[data-approval-mode="true"] table thead th:contains("Action"),
[data-approval-mode="true"] table thead th:contains("Actions") {
    display: none !important;
}

/* ✅ Allow action footers in excluded tabs (e.g., Jobs, ApprovalActions) when editing */
[data-approval-mode="true"] #DynamicCAPartialContainer.excluded-edit .card-footer,
[data-approval-mode="true"] #AgreementDetails.excluded-edit .card-footer {
    display: flex !important;
}

/* Hide Save & Next / Cancel footer on ApprovalActions tab in non-readonly mode (defensive CSS) */
[data-approval-mode="false"] .create-update-form:has(#tab-approvalActions.active.show) > .card-footer {
    display: none !important;
}

/* History Panel Styles */
.history-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .history-panel.open {
        right: 0;
    }

.history-header {
    flex-shrink: 0;
}

.history-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: #e9ecef;
    }

.timeline-item {
    position: relative;
    padding-left: 50px;
    padding-bottom: 1rem;
}

    .timeline-item:last-child {
        padding-bottom: 0;
    }

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    box-shadow: 0 0 0 4px white;
}

.timeline-content {
    position: relative;
}

    .timeline-content .card {
        transition: transform 0.2s ease-in-out;
    }

        .timeline-content .card:hover {
            transform: translateX(5px);
        }


.readonly-mode input:not([type="hidden"]),
.readonly-mode select,
.readonly-mode textarea {
    pointer-events: none !important;
    background-color: #f5f5f5 !important;
    color: #6c757d !important;
    opacity: 1 !important;
}

/* Disable checkbox/radio too */
.readonly-mode input[type="checkbox"],
.readonly-mode input[type="radio"] {
    pointer-events: none !important;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .history-panel {
        width: 100%;
        right: -100%;
    }
}

/* Overlay for history panel */
.history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    display: none;
}

    .history-overlay.show {
        display: block;
    }