:root {
    --main-color: #ca3032; /*#da534d;*/
    --secondary-color: #269abc;
    --tertiary-color: #ffc107;
    --tertiary-subtle-color: #fff8e6;
    --blue-background-color: #e4f2ff;
    --darkblue-background-color: #0c3454;
    --darkred-background-color: #BC5454;
    --lightyellow-background-color: #fff6ca;
    --grey-background-color: #6c757d;
    --bs-primary-rgb: 224, 89, 81;
    --hero-color: #FFF8F8;
    --header-color: #ca3032;
    --ul-color: #4c9ce4;
    --txt-color: var(--bs-body-color);
    --bs-navbar-active-color: #1e5f74;
    /*
    --footer-color: #0c3454;
    --disabled-color: #e9ecef;
    --cloud-color: 62, 137, 221;
    --white-color: #ffffff;
    --bs-body-bg: #fff;
    --bs-body-font-size: 1.05rem;
    --bs-font-sans-serif: 'Open Sans',Arial,Helvetica,sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --font-weight-bold: 700;
    --font-weight-semibold: 600;
    --font-weight-normal: 400;
    --bs-section-gutter-x: 3.0rem;
    */
}

.shortcut-hint {
    opacity: 0.7;
    font-size: 0.8em;
    margin-left: 5px;
}

/* extra vertical gutters */
.g-6,
.gx-6 {
    --bs-gutter-x: 5rem !important;
}

.g-6,
.gy-6 {
    --bs-gutter-y: 5rem !important;
}

.g-7,
.gx-7 {
    --bs-gutter-x: 7rem !important;
}

.g-7,
.gy-7 {
    --bs-gutter-y: 7rem !important;
}

.g-8,
.gx-8 {
    --bs-gutter-x: 10rem !important;
}

.g-8,
.gy-8 {
    --bs-gutter-y: 10rem !important;
}

.btn-wrapper {
    display: inline-flex;
    align-items: center;
}

/* Make the button look pressed when activated via keyboard */
.btn:focus, a.btn:focus {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}

/* Make the button look pressed when activated via keyboard */
button:focus {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}

.form-select {
    /*
    --bs-form-select-bg-img: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23adb5bd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e);
    */
}

.second-color {
    color: var(--secondary-color);
    background-color: transparent;
}

.default-case-color {
    color: var(--tertiary-color);
}

.default-case-subtle-color {
    color: var(--tertiary-subtle-color);
}

.text-orange {
    --bs-text-opacity: 1;
    color: rgba(244, 129, 43) !important;
}

/* System Integration Status */
/* Pulse animation for active status */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-active {
    background-color: #198754;
    animation: pulse 2s infinite;
}

.status-warning {
    background-color: #ffc107;
}

.status-error {
    background-color: #dc3545;
}

.status-inactive {
    background-color: #6c757d;
}

.api-metrics {
    font-size: 0.875rem;
}

.refresh-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.latency-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.system-card {
    transition: all 0.3s ease;
}

.system-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    padding: 0rem 0rem 0.75rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    transform: scale(1.4);
    padding-bottom: 0.4rem;
}

/* login user data */
.user-organisation {
    font-size: 0.8em;
    color: #666;
    font-style: italic;
    margin-left: 0.5rem;
}

/* Special styling for view all mode */
.user-organisation[data-view-all="view-all"] {
    color: #0066cc;
}

/* Custom styles for the stepper */
.stepper {
    list-style: none;
    padding: 0;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
    z-index: 1;
}

.stepper-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 1.5rem;
}

.stepper-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #dee2e6;
    z-index: 2;
}

.stepper-item.completed::before {
    background: #198754;
    border-color: #198754;
}

.stepper-item.active::before {
    background: #0d6efd;
    border-color: #0d6efd;
}

.stepper-item.completed .stepper-title,
.stepper-item.active .stepper-title {
    color: #000;
}

.stepper-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.stepper-desc {
    font-size: 0.875rem;
    color: #6c757d;
}

/*
.mps a.nav-link {
    font-weight: 500;
    padding-left: 8px;
}
.mps a.active {
    border-left: 4px solid #4499dc;
}
*/

.navbar-nav .nav-link, .navbar-nav .nav-link.active, .navbar-nav .nav-link.show {
    /* color: var(--bs-navbar-active-color);*/
    color: #1e5f74;
}

/* Layout specific styles */
.sidebar {
    width: 280px;
    border-right: 1px solid #dee2e6;
}

.help-panel {
    width: 280px;
    border-left: 1px solid #dee2e6;
}

.main-content {
    min-height: calc(100vh - 56px);
}

/* Custom scrollbar for better UX */
.custom-scrollbar {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #6c757d;
    border-radius: 3px;
}

/* Resources/Public/Css/Productmodel/Editor.css */
.spec-flow {
    background: #f8f9fa;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.spec-card {
    width: 280px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, .125);
    background: white;
}

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.transform-block {
    cursor: pointer;
    padding: 1rem;
    transition: all 0.3s ease;
}

.transform-block:hover {
    transform: scale(1.1);
}

.transform-arrow {
    text-align: center;
}

.transform-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.connection-lines {
    pointer-events: none;
    z-index: 0;
}

.connection-path {
    stroke: #dee2e6;
    stroke-width: 2;
    fill: none;
}

.spec-stats {
    margin-top: 1rem;
}

.status-badge {
    font-size: 0.875rem;
    font-weight: normal;
}

/* Autocomplete */
.autocomplete-container {
    position: relative;
    /* margin-bottom: 1rem; */
}

.autocomplete-input-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 16px;
    color: #6c757d;
    cursor: pointer;
    padding: 0 5px;
    display: none;
    z-index: 5;
}

.autocomplete-clear-btn:hover {
    color: #343a40;
}

.autocomplete-results {
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f8f9fa;
}

.autocomplete-item strong {
    color: #0d6efd;
}

.selected-item {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    border: 1px solid #e9ecef;
}

/* Ensure input is properly padded to accommodate the clear button */
input[data-autocomplete-input] {
    padding-right: 30px;
}

/* Resources/Public/Css/Productmodel/Editor.css */

/* Editor Common Styles */
.editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

.handle {
    cursor: move;
    color: #6c757d;
}

.handle:hover {
    color: #495057;
}

/* Specification Editor Styles */
.specification-item {
    transition: transform 0.2s ease;
    border-left: 4px solid #0d6efd;
}

.specification-item:hover {
    transform: translateX(5px);
}

.options-container {
    max-height: 200px;
    overflow-y: auto;
}

/* Transformation Editor Styles */
.transformation-block {
    transition: transform 0.2s ease;
}

.transformation-block[data-type="if-then-else"] {
    border-left: 4px solid #0d6efd;
}

.transformation-block[data-type="switch"] {
    border-left: 4px solid #17a2b8;
}

.switch-case {
    border-left: 3px solid #6c757d;
}

.formula-display {
    background-color: #f8f9fa;
    border-color: #22c55e;
    font-family: monospace;
    font-size: 0.9em;
    color: #686868;
}

.value-input-container {
    position: relative;
}

.input-button-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.btn-container {
    display: flex;
    justify-content: flex-start;
    /* Width of 2 buttons: 2 * 38px (button) + 2 * 12px (padding) + 2 * 1px (border) = ~102px */
    min-width: 80px;
}

.btn-container .btn {
    border-radius: 0;
    /* Ensure consistent button size */
    min-width: 38px;
    padding: 6px 12px;
}

.btn-container .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-container .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.btn-container .btn:only-child {
    border-radius: 0.375rem;
}

.btn-container .btn + .btn {
    border-left: 0;
}

.dropzone {
    transition: background-color 0.2s ease;
    min-height: 50px;
}

.dropzone.drag-over {
    background-color: rgba(13, 110, 253, 0.1);
    border-style: dashed !important;
}

/* Validation Styles */
.is-invalid ~ .invalid-feedback {
    display: block;
}

.validation-error {
    border-color: #dc3545;
    border-width: 2px;
}

/* accordion */
.accordion-header button {
    background-color: transparent;
}

/* Animation Styles */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1060;
}

.toast {
    min-width: 250px;
}

.completed-edge {
    /*
    border: 3px solid #cff4fc;
    background-color: #f6f9fa;
    */
    background-color: rgb(234,240,246);
    border: 2px solid rgb(203,214,226);
    color: rgb(81,111,144);
}

/* Custom Essential A4 settings for Quotation */
@page {
    size: A4;
    margin: 0;
}

/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Document structure */
.doc {
    counter-reset: page;
    width: 210mm;
    background: white;
}

/* Page layout */
.page {
    counter-increment: page;
    width: 210mm;
    height: 297mm;
    padding: 20mm;
    background: white;
    position: relative;
    page-break-after: always;
    border: 1px solid #dfdfdf;
    margin-bottom: 2px;
}

.endlesspage {
    counter-increment: page;
    width: 210mm;
    padding: 20mm;
    background: white;
    position: relative;
    page-break-after: always;
    border: 1px solid #dfdfdf;
    margin-bottom: 2px;
}

/* Content and header */
.header, .content {
    width: 170mm;
}

/* Footer positioning */
.footer {
    position: absolute;
    bottom: 20mm;
    left: 20mm;
    width: 170mm;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

/* Page numbers */
.page-number:after {
    content: counter(page);
}

.total-pages:after {
    content: "3";
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Print settings */
@media print {
    html {
        width: 210mm;
        height: 297mm;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
        width: 210mm !important;
    }

    .doc {
        width: 210mm !important;
        margin: 0 !important;
    }

    .page {
        margin: 0 !important;
        padding: 20mm !important;
    }

    /* Hide all content outside our document */
    body > *:not(.doc) {
        display: none !important;
    }

    /* Force backgrounds to print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}