/* Ensure body and html take full height */
html {
    height: 100%;
    margin: 0;
    font-family: 'Manrope', sans-serif;
}

body {
    height: 100%;
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #48516C;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #f3f4f6;
}

/* Ensure all text elements use semibold font-weight */
p, span, div, a, label, td, th, li, h1, h2, h3, h4, h5, h6,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
    font-weight: 600;
}

#top-bar {
    flex-shrink: 0;
    background-color: #334155;
    color: #ffffff;
    padding: 6px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-height: 50px;
}

.top-bar-title {
    grid-column: 1 / 2;
    justify-self: start;
    text-align: left;
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0px;
}

#top-bar>.ui.buttons {
    grid-column: 2 / 3;
    justify-self: end;
}

#load-button.ui.button {
    margin-right: 8px !important;
}

#top-bar .ui.buttons .button,
#top-bar .ui.button {
    color: white;
    text-transform: uppercase;
}

#top-bar .ui.buttons .button:hover,
#top-bar .ui.button:hover {
    color: white;
}

#file-input {
    display: none;
}

.ui.table td,
.ui.table th {
    padding: 7px !important;
}

/* Panel Container Styles */
.panel-container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    background-color: #f3f4f6;
}

/* Left Panel Styles */
.left-panel {
    min-width: 300px;
    max-width: 1000px;
    width: 800px;
    background-color: #ffffff;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.left-panel .panel-content {
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: auto;
    scrollbar-color: #ccc transparent;
    font-family: 'Manrope', Arial, sans-serif;
    font-size: 14px;
    color: #48516C;
    position: relative;
}

/* Ensure dropdowns can overflow the panel content */
.left-panel .panel-content .ui.dropdown .menu {
    z-index: 1002 !important;
    position: fixed !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.left-panel .panel-content::-webkit-scrollbar {
    width: 16px;
}

.left-panel .panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.left-panel .panel-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* Divider Styles */
.divider {
    width: 6px;
    background-color: #e5e7eb;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    z-index: 5;
    transition: background-color 0.2s;
}

.divider:hover,
.divider.active {
    background-color: rgb(31, 41, 55);
}

/* Ensure cursor remains as resize during dragging */
body.dragging-divider * {
    cursor: col-resize !important;
    user-select: none;
}

/* Right Panel Styles */
.right-panel {
    flex-grow: 1;
    flex-shrink: 1;
    background-color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    border-left: 1px solid #e5e7eb;
}

.right-panel .panel-content {
    height: 100%;
    padding: 20px;
    font-family: 'Manrope', Arial, sans-serif;
    font-size: 14px;
    color: #48516C;
    overflow-y: auto;
    overflow-x: auto;
    /* Allow horizontal scroll for #test div */
}

/* Panel content styles */
.panel-title {
    font-family: 'Manrope', sans-serif !important;
    font-size: 18px;
    line-height: 28px;
    font-weight: 600;
    color: #48516C;
    flex-shrink: 0;
}

/* Ensure Semantic UI headers use Manrope font */
.ui.header,
.ui.dividing.header,
.panel-title.ui.header,
.panel-title.ui.dividing.header,
h3.ui.header,
h3.ui.dividing.header {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 600 !important;
    color: #48516C !important;
}

/* Specific rule for panel-title with ui dividing header to maintain size */
.panel-title.ui.dividing.header,
h3.panel-title.ui.dividing.header {
    font-size: 18px !important;
}

/* Ensure Semantic UI menu and tabular menu use Manrope font */
.ui.menu,
.ui.tabular.menu,
.ui.secondary.menu,
.ui.menu .item,
.ui.tabular.menu .item,
.ui.secondary.menu .item,
.ui.menu .item.active,
.ui.tabular.menu .item.active,
.ui.secondary.menu .item.active {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #48516C !important;
}

/* Ensure Semantic UI modal windows use Manrope font */
.ui.modal,
.ui.modal .content,
.ui.modal .actions {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #48516C !important;
}

/* Modal header uses 20px font-size */
.ui.modal .header {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 600 !important;
    font-size: 20px !important;
    color: #48516C !important;
}

/* Ensure Semantic UI buttons use Manrope font */
.ui.button,
.ui.buttons .button,
.ui.approve.button,
.ui.labeled.icon.button,
.ui.blue.button,
.ui.small.button,
.ui.icon.button {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.placeholder-div {
    border-radius: 4px;
}

.panel-content-area {
    border-radius: 4px;
    flex-grow: 1;
    overflow: auto;
    min-height: 30px;
}

/* Ensure dropdown menus are not cut off */
.ui.dropdown .menu {
    z-index: 1000 !important;
    position: absolute !important;
}

/* Fix for table container to prevent dropdown cutoff */
.table-container {
    position: relative;
    overflow: visible;
}

/* Ensure the memberTable container allows dropdowns to overflow */
#left-panel-top .panel-content-area {
    overflow: visible;
}

/* Specific fix for dropdown menus in tables */
.ui.table .ui.dropdown .menu {
    z-index: 1002 !important;
    position: fixed !important;
    max-height: 200px;
    overflow-y: auto;
}

/* Fixed width for member type dropdown in memberTable */
#memberTable .member-type-dropdown {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    flex-shrink: 0;
}

/* Ensure notes input field takes remaining space */
#memberTable .notes-input-container {
    width: 100% !important;
    min-width: 0;
}

#memberTable .notes-input-container .ui.fluid.input {
    width: 100% !important;
    min-width: 0;
}

/* Table container settings */
.table-container {
    overflow-y: visible;
    /* Allow dropdowns to extend beyond container height */
}

.reduce-pad {
    padding: 0px !important;
    margin-bottom: 0px !important;
}





.page-header,
.page-header-space {
    height: 70px;
}

.page-footer,
.page-footer-space {
    height: 55px;
}

.page-footer {
    position: fixed;
    bottom: 0;
}

.page-header {
    position: fixed;
    top: 0mm;
}

/* .page { page-break-after: always;} */
@page {
    margin: 20mm
}

@media print {
    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    button {
        display: none;
    }

    body {
        margin: 0;
    }

    .break_here {
        page-break-before: always;
    }
}



/* Style for the image that will be animated */
.guide-image-small {
    display: none;
    position: absolute;
    width: 225px;
    height: 225px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    object-fit: contain;
    border-radius: 8px;
    /* fit the whole image */
    background-color: #fff;
    /* optional: fill empty space */
    z-index: 10;
}

.guide-image-big {
    display: none;
    position: absolute;
    width: 300px;
    height: 350px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    object-fit: contain;
    border-radius: 8px;
    /* fit the whole image */
    background-color: #fff;
    /* optional: fill empty space */
    z-index: 10;
}

.guide-image-bolts {
    display: none;
    position: absolute;
    width: 700px;
    height: 550px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    object-fit: contain;
    border-radius: 8px;
    background-color: #fff;
    z-index: 1060;
    pointer-events: none;
}

/* Style for the icon button */
.guide-icon-button {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 20;
    cursor: pointer;
}



select[multiple].ui.fluid:focus {
    border-color: rgba(34, 36, 38, 0.5) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Center images in canvas-guide-container */
#canvas-guide-container-parts-join-panel-3 .w3-container.w3-center,
[id^="canvas-guide-container-"] .w3-container.w3-center {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    text-align: center !important;
}

#canvas-guide-container-parts-join-panel-3 .w3-container.w3-center img,
[id^="canvas-guide-container-"] .w3-container.w3-center img {
    display: block !important;
    margin: 15px auto 0 auto !important;
    max-width: 100% !important;
    height: 300px !important;
    width: auto !important;
}