/* Hide Vue template placeholders until Vue is loaded */
[v-cloak] {
    display: none !important;
}

/* Optional: Add a loading spinner for the Vue app */
.vue-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.vue-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

body {
    font-family: 'Roboto Condensed', sans-serif;
}

.btn {
    font-family: 'Roboto', sans-serif;
}

.btn-group-sm .btn {
    font-family: 'Roboto Condensed', sans-serif;
}


.vertical-nav .nav-link.active {
    color: black;
    font-weight: bold;
    background-color: var(--theme-color-light);
    border-radius: 4px;
}

th {
    word-break: break-all;
    white-space: normal;
}
th.canbreak {
    word-break: break-word;
}

.nobr {
    white-space: nowrap;
}

.nav {
    --bs-link-hover-color: var(--theme-color-dark);
}

.navbar-nav .nav-link.active {
    --bs-navbar-active-color: var(--theme-color);
    font-weight: bold;
}

.process {
    border: 1px black outset;
    background-color: white;
    border-bottom-right-radius: 16px;
    border-top-right-radius: 16px;
    margin: 8px;
    width: 140px;
    height: 98px;
    box-shadow: 2px 2px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    display: inline-flex;
    flex-direction: column;
    padding: 0;
    transition: all 0.2s ease;
    text-align: left;
}

.process span {
    padding: 0 0 0 16px;
}

.process:hover {
    transform: scale(1.05);
}

.process h2 {
    border-top-right-radius: 15px;
    font-size: 24px;
    padding: 4px 0 4px 16px;
}


.material {
    border: 1px black outset;
    background-color: white;
    border-bottom-left-radius: 9px;
    width: 48px;
    height: 32px;
    font-weight: 500;
    box-shadow: 2px 2px rgba(0, 0, 0, 0.2);
    font-size: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.material .bi {
    display: block;
    align-self: flex-start;
    padding-left: 5px;
    font-size: 10px;
}

.material:hover {
    transform: scale(1.05);
    filter: brightness(110%);
}

.mould-type-metal {
    background: silver;
    color: black !important;
}



.material.material-zn,
.material.material-zinc,
.material.mould-type-metal {
    background: silver;
    color: black !important;
}

.material.material-zn:hover,
.material.material-zinc:hover,
.material.mould-type-metal:hover {
    background-image: linear-gradient(to bottom right, silver 0%, silver 73%, hsl(231, 30%, 75%) 81%);
}

.material.material-abs,
.material.mould-type-plastic {
    background: antiquewhite;
    color: black !important;
}

.material.material-gp {
    border-style: dashed;
    background-color: white;
    color: black !important;
}

.material.material-tpr55 {
    border-style: dotted;
    background-color: #6a6a6a;
    color: white !important;
}

.material.material-tpr65 {
    border-style: dashed;
    background-color: #2a2a2a;
    color: white !important;
}

.toolplan-material {
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: antiquewhite;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    color: black !important;
    border: 1.5px black solid;
}

.toolplan-material.material-P-1-02-00ZINC-001 {
    background-color: silver;
}

mark {
    padding: 0;
}

/* Dropzone and Image Preview Styles */
.dropzone {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px dashed #dee2e6 !important;
}

.dropzone:hover {
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.05);
}

.dropzone.border-primary {
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1);
}

.image-preview-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.image-preview-card:hover .image-overlay {
    opacity: 1 !important;
}

.image-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
}

.image-info {
    background: rgba(0, 0, 0, 0.8) !important;
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px !important;
}

.dropzone-hint {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-preview-card img {
        height: 100px !important;
    }

    .col-6.col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .col-6.col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Cavity state styling */
.cavity-row-scrapped td:not(.cavity-state-container) {
    opacity: 0.4;
}

.cavity-row-not-produced td:not(.cavity-state-container) {
    opacity: 0.6;
}

.process-badge {
    color: black;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.change-annotation-badge {
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: middle;
}

.change-annotation-badge.badge-added {
    background-color: #198754;
    color: #fff;
}

.change-annotation-badge.badge-deleted {
    background-color: #6c757d;
    color: #fff;
}

.change-annotation-badge.badge-replacement {
    background-color: #0d6efd;
    color: #fff;
}

.change-annotation-badge.badge-replaced {
    background-color: #6c757d;
    color: #fff;
}

tr.change-deleted-row > td:not(.cavity-state-container) {
    text-decoration: line-through !important;
    color: #6c757d !important;
}

table.table-decoration tr.change-deleted-row > td,
table.toolplan-cavities-table tr.change-deleted-row > td:not(.cavity-state-container) {
    text-decoration: line-through !important;
    color: #6c757d !important;
}

tr.change-deleted-row .change-annotation-badge,
tr.change-deleted-row .badge.process-badge {
    text-decoration: none !important;
}

.sheet {
    position: fixed;
    top: 32px;
    left: 32px;
    right: 32px;
    bottom: 0;
    z-index: 1055;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
    display: none;
    flex-direction: column;
    max-width: calc(100vw - 64px);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    transition: opacity .15s linear;
}

.sheet.show {
    display: flex;
    opacity: 1;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    border-radius: 1.25rem 1.25rem 0 0;
    background: #f8f9fa;
}

.sheet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 1.25rem 1.25rem;
    background: #f8f9fa;
    position: absolute;
    bottom: 0;
    height: 60px;
    width: 100%;
}

.sheet-body {
    flex: 1 1 auto;
    padding: 1.5rem;
    overflow-y: auto;
    padding-bottom: 60px;
}

.sheet-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity .2s;
}

.sheet-close:hover {
    opacity: 1;
}

.sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.sheet.show~.sheet-backdrop {
    display: block;
}

.accordion-button::after {
    margin-left: 0;
}

.bi-weight-scale {
    display: inline-block;
    mask-image: url(/images/weight.svg);
    mask-size: 24px;
    mask-repeat: no-repeat;
    mask-position: center;
    background-color: black;
    width: 24px;
    height: 24px;
    margin-left: 0;
}
.bi-weight-scale-hollow {
    display: inline-block;
    mask-image: url(/images/weight-hollow.svg);
    mask-size: 24px;
    mask-repeat: no-repeat;
    mask-position: center;
    width: 24px;
    height: 24px;
    margin-left: 0;
    background-color: black;
}
.text-danger .bi-weight-scale,
.text-danger .bi-weight-scale-hollow {
    background-color: rgb(var(--bs-danger-rgb));
}

.mould-metadata {
    display: flex;
    align-items: center;
}

.mould-metadata-item {
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Form check styling for assembly checkboxes */
.form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-check-label:has(.form-check-input:disabled) {
    opacity: 0.7;
    cursor: not-allowed;
}




.used-qty-input:invalid {
    border-color: red;
}

.quantity-input:invalid {
    border-color: red;
}

.input-group-text.compact {
    padding: 0.375rem 0.3rem;
    font-size: 0.8rem;
}


/* Disabled dropdown styling for metal moulds */
.form-select:disabled {
    cursor: not-allowed;
}

.reorder-moulds-item {
    cursor: grab;
    user-select: none;
}

.reorder-moulds-item:active {
    cursor: grabbing;
}

.reorder-processes-item {
    cursor: grab;
    user-select: none;
}

.reorder-processes-item:active {
    cursor: grabbing;
}

/* Autosave indicator styles */
.autosave-status {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

.autosave-status i {
    font-size: 1rem;
}

.autosave-status i.bi-arrow-repeat {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* .tab-pane#decoration .table-responsive {
    min-height: 400px;
}

.tab-pane#decoration .card .table-responsive {
    overflow-y: visible;
} */
.table-responsive {
    overflow: visible;
}

.text-gray-500 {
    color: var(--bs-gray-500) !important
}

/* 
table.griddy td,
table.griddy th {
    border-left: 1px solid #dee2e6 !important;
    border-right: 1px solid #dee2e6 !important;
} */
.table-decoration {
    table-layout: fixed;
}

.table-decoration tr td.border-light {
    border-color: #eee !important;
}

.table-decoration tr:last-child td {
    border-bottom: none !important;
}
.no-bottom-border {
    border-bottom: none !important;
}

.no-top-border {
    border-top: none !important;
}

.no-top-border td {
    border-top: none !important;
}

.no-bottom-border td {
    border-bottom: none !important;
}

/* Remove borders between process rows */
.assembly-parts-table tr.no-top-border td,
.packaging-parts-table tr.no-top-border td {
    border-top: none !important;
}

.assembly-parts-table tr.no-bottom-border td,
.packaging-parts-table tr.no-bottom-border td {
    border-bottom: none !important;
}

/* Specifically remove border between consecutive process rows */
.assembly-parts-table tr.no-bottom-border + tr.no-top-border,
.packaging-parts-table tr.no-bottom-border + tr.no-top-border {
    border-top: none !important;
}

.assembly-parts-table tr.no-bottom-border + tr.no-top-border td,
.packaging-parts-table tr.no-bottom-border + tr.no-top-border td {
    border-top: none !important;
}

span.partno {
    color: rgb(19, 0, 128);
}

.required-asterisk {
    color: red;
}

.remarks-button:hover {
    color: var(--theme-color);
}

.btn-outline-info:hover {
    color: var(--theme-color);
}

.is-loading {
    background-image: url("../images/loading.gif");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 32px 32px;
    background-color: #fbfbfb !important;
}

.row_remarks {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    flex-basis: 600px;
    flex-grow: 0;
    flex-shrink: 1;
    min-width: 40px;
    font-size: 0.8rem;
}

.truncated_remarks {
    display: inline-block;
    line-height: 1.2;
}
@media screen {
    .truncated_remarks {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-height: 2rem;
        text-overflow: ellipsis;
    }
}

.badge-approval-N {
    background-color: #add6ea;
}

.badge-approval-I {
    background-color: #c7bde9;
}

.badge-approval-Y {
    background-color: #b0ddce;
}
.badge-approval-Y-P {
    background: linear-gradient(to right, #b0ddce 0%, #eae7ad 100%);
}
.badge-approval-P {
    background-color: #c49a47ae;
}

.status-approval-check {
    margin-left: 0.2em;
    vertical-align: -0.1em;
    font-size: 1.05em;
    line-height: 1;
}

.badge-change-note-draft {
    background-color: #f0d49a;
}

.btn-visually-disabled,
.btn-visually-disabled:hover,
.btn-visually-disabled:focus,
.btn-visually-disabled:active {
    color: var(--bs-btn-disabled-color);
    background-color: var(--bs-btn-disabled-bg);
    border-color: var(--bs-btn-disabled-border-color);
    opacity: var(--bs-btn-disabled-opacity);
    box-shadow: none;
    pointer-events: auto;
}

.print-subtitle {
    display: none;
}
.input-group-location {
    flex-basis:140px; 
    flex-grow:0; 
    flex-shrink:0;
}
.input-group-applications {
    flex-basis:68px; 
    flex-grow:0; 
    flex-shrink:0;
}

/* Change note new parts - light green background */
.change-note-new-part td {
    background-color: #e6f9eb !important;
}
.change-note-deleted-part td {
    background-color: #f8d7da !important;
    text-decoration: line-through !important;
    color: #6c757d !important;
}
.change-note-quantity-change td,
.table-striped .change-note-quantity-change td,
.table-decoration .change-note-quantity-change td {
    background-color: #fff3cd !important;
}
.change-note-replaced-part td {
    background-color: #e7f1ff !important;
}

.change-note-mode-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 1025;
    background: #d97706;
    color: #fff;
    border-bottom: 2px solid #b45309;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.change-note-pending-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 1025;
    background: #0d6efd;
    color: #fff;
    border-bottom: 2px solid #0a58ca;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.change-note-rejected-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 1025;
    background: #dc3545;
    color: #fff;
    border-bottom: 2px solid #b02a37;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.change-note-approved-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 1025;
    background: #198754;
    color: #fff;
    border-bottom: 2px solid #146c43;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.change-note-mode-banner-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    max-width: 100%;
}

.change-note-mode-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 1.35rem;
    flex-shrink: 0;
}

.change-note-mode-banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.change-note-mode-banner-title {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.change-note-mode-banner-message {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.95;
}

.change-note-mode-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .change-note-mode-banner-inner {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
    }

    .change-note-mode-banner-actions {
        width: 100%;
    }

    .change-note-mode-banner-actions .btn {
        flex: 1 1 auto;
    }
}

.checklist li {
    margin-bottom: 0.5rem;
}

/* Rename preview: dim manual-step cards when marked complete */
.manual-step-card {
    transition: all 0.2s ease;
}
.manual-step-card:has(.manual-step-completed:checked) .card-body {
    display: none;
}
.manual-step-card:has(.manual-step-completed:checked) .card-header {
    opacity: 0.5;
}
/* Alert modal styling */
.modal[data-alert-type="warning"] .modal-content {
    --bs-modal-border-width: 6px;
    --bs-modal-border-color: rgb(255, 196, 0);
}
.modal[data-alert-type="warning"] .modal-content {
    /* large SVG warning triangle background */
    background-image: url('/images/faded-warning-triangle.svg');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 270px;
    min-height: 270px;
}

.modal[data-alert-type="success"] .modal-content {
    --bs-modal-border-width: 6px;
    --bs-modal-border-color: rgb(0, 128, 0);
}
.modal[data-alert-type="success"] .modal-content {
    /* large SVG success checkmark background */
    background-image: url('/images/faded-success-checkmark.svg');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 270px;
    min-height: 270px;
}


.notifications-badge {
    position: absolute;
    top: 2px;
    right: -8px;
    font-size: 0.7rem;
    min-width: 1.15rem;
    line-height: 1.15rem;
}

.notifications-dropdown {
    width: 360px;
    max-height: 420px;
    overflow-y: auto;
}

.notification-item {
    white-space: normal;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #dee2e6;
}

.notification-item .notification-text {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.notification-item.is-unread {
    background-color: #f8f9ff;
    border-left-color: #0d6efd;
}

.notification-item.is-read {
    opacity: 0.85;
}

.notifications-show-all {
    font-weight: 500;
}

.notification-list-item.is-unread {
    border-left: 4px solid #0d6efd;
    background-color: #f8f9ff;
}

.bulk-parts-search-steps .list-group-item {
    flex: 1;
    justify-content: center;
    font-size: 0.8125rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.bulk-parts-search-steps .list-group-item .badge {
    background-color: #adb5bd;
}

.bulk-parts-search-steps .list-group-item.active {
    color: #0d6efd;
    background-color: #e7f1ff;
    border-color: #b6d4fe;
    font-weight: 500;
}

.bulk-parts-search-steps .list-group-item.active .badge {
    background-color: #0d6efd;
}

.bulk-parts-search-steps .list-group-item.completed {
    color: #198754;
    background-color: #f0fff4;
    border-color: #badbcc;
}

.bulk-parts-search-steps .list-group-item.completed .badge {
    background-color: #198754;
}

.date-input-component {
    width: 100%;
}

.date-input-component .dp__main {
    width: 100%;
}

.date-input-component .dp__input_wrap {
    width: 100%;
}

.date-input-component .dp__input {
    width: 100%;
    min-height: calc(1.5em + 0.75rem + 2px);
    font-family: inherit;
    font-size: 1rem;
}

.date-input-component .dp__input:disabled {
    background-color: var(--bs-secondary-bg, #e9ecef);
    opacity: 1;
}

.date-input-component .dp__input.is-invalid {
    border-color: var(--bs-form-invalid-border-color, #dc3545);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.dp__menu {
    z-index: 1065;
}