body {
    font-family: 'Roboto','Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Panton','Roboto','Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.content {
    display: flex;
    width: 100%;
}

.tree-container {
    width: 30%;
    border-right: 1px solid #ccc;
    padding-right: 10px;
    overflow-y: auto;
    max-height: 100vh;
}

.tree-node {
    margin-left: 15px;
    margin-top: 5px;
    position: relative;
}

.tree-node-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 0px;
}

.tree-node-label.drag-over {
    background-color: #f0f0f0;
}

.tree-node-icon {
    margin-right: 5px;
    transition: transform 0.3s;
}

.tree-node-icon.collapsed {
    transform: rotate(0deg);
}

.tree-node-icon.expanded {
    transform: rotate(90deg);
}

.tree-node-children {
    display: none;
    margin-left: 15px;
}

/* Color coding based on type */
.type-Hall {
    color: #1f77b4;
    /* Blue */
}

.type-Section {
    color: #ff7f0e;
    /* Orange */
}

.type-Shelf {
    color: #d62728;
    /* Red */
}

.type-Vendor {
    color: #2ca02c;
    /* Green */
}

.type-empty {
    color: #000000;
    /* Purple */
}

#signInButton {
    padding: 10px;
    background-color: #106bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: large;
}

#signInButton:hover {
    background-color: #0b5dd7;
}

.details-container {
    width: 70%;
    padding-left: 20px;
    overflow-y: auto;
    max-height: 100vh;
    display: flex;
    align-items: flex-start; /* Align items at the start of the container */
}

.details {
    margin-top: 20px;
    width: 350px; /* Set the width of the details div */
    padding: 10px;
    box-sizing: border-box; /* Include padding in the element's total width and height */
}

.details h2 {
    margin-top: 0;
}

.details p {
    margin: 5px 0;
}

#layout-canvas {
    border: 1px solid #ccc; /* Optional: Add a border to the canvas for better visibility */
}


#progress-container {
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    z-index: 1000; 
    display: flex; 
    flex-direction: 
    column-reverse; gap: 10px;
}

.progress-message {
    font-size: 0.8em;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 5px;
    z-index: 1000;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    min-width: 200px;
    margin-top: 8px;
}

/* Progress ongoing style */
.progress-ongoing {
    background-color: #FF9800; /* Orange */
    color: white;
}

/* Done style */
.progress-done {
    background-color: #4CAF50; /* Green */
    color: white;
}

/* Error style */
.progress-error {
    background-color: #cf4242; /* Green */
    color: white;
}

/* Spinner (before) */
.progress-ongoing::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border: 3px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

/* Close button */
.progress-message button {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-left: auto;
    padding-left: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#error-container {
    position: fixed;
    bottom: 50px; /* Adjust based on the height of the progress bar */
    right: 20px;
    z-index: 1000;
    width: 220px; /* Adjust width as needed */
}

.error-message {
    background-color: #cf4242; /* Red */
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.error-message button {
    background: none;
    border: none;
    color: white;
    font-size: 1em;
    cursor: pointer;
}

/* Style for the form container */
.new-child-form-container {
    max-width: 400px;
    margin: 10px auto;
    padding: 0px 20px 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Style for the form row */
.new-child-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Style for labels */
.new-child-form-row label {
    flex: 1;
    margin-right: 10px;
    font-weight: bold;
}

/* Style for input fields */
.new-child-form-row input[type="text"],
.new-child-form-row input[type="number"] {
    flex: 2;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Style for the button */
.new-child-form-container button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.new-child-form-container button:hover {
    background-color: #45a049;
}


/* QR scanning style */

#scanButton {
    background-color: #106bff;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

#scanButton:hover {
    background-color: #0b5dd7;
}

#qr-reader {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
}

#qr-success-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 22;
    color: limegreen;
    font-size: 8rem;
    font-weight: bold;
}

.checkmark {
    animation: pop 0.5s ease;
}

@keyframes pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#qr-cancel-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 21;
}

.inventory-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    padding: 10px;
    margin: auto;
    font-family: 'Segoe UI', sans-serif;
}

.inventory-form input,
.inventory-form select {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1;
}

.row-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.row-group > * {
    flex: 1;
    max-width: 100%;
}

.row-group button.small-button {
    flex: 0 0 auto; /* Don't stretch buttons */
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap;
}

.row-group input,
.row-group select {
    flex: 1 1 auto;
    min-width: 0; /* prevent overflow */
}

.user-row > * {
    flex: unset;
}

.small-button {
    padding: 8px 12px;
    background-color: #106bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: bold;
}

.small-button:hover {
    background-color: #0b5dd7;
}

.small-button:disabled {
    background-color: #ccc;
    cursor: default;
}

.submit-button {
    padding: 10px;
    background-color: #106bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    font-weight: bold;
}

.submit-button:hover {
    background-color: #0b5dd7;
}

.submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

select#searchDropdown, #targetObjectNameContainer {
    min-width: 160px; /* Prevent squashing */
}

.index-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.index-container h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}

.index-container .subtitle {
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
}

.index-section {
    margin-top: 2rem;
}

.index-section h2 {
    font-size: 1.4rem;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.link-buttons a {
    display: inline-block;
    margin: 5px 10px 10px 0;
    padding: 10px 14px;
    background-color: #106bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

.link-buttons a:hover {
    background-color: #0b5dd7;
}

.tool-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-list li {
    margin: 8px 0;
    font-size: 1rem;
}

.tool-list a {
    text-decoration: none;
    color: #106bff;
    font-weight: bold;
}

.tool-list a:hover {
    text-decoration: underline;
}

table.inventory-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    background-color: white;
    border: 1px solid #ccc;
}

.inventory-table thead {
    background-color: #f0f2f5;
    text-align: left;
}

.inventory-table th, .inventory-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.inventory-table th {
    font-weight: bold;
    color: #333;
}

.inventory-table tr:hover {
    background-color: #f9f9f9;
}

.inventory-table input[type="text"] {
    width: 100%;
    padding: 4px;
    font-size: 13px;
    box-sizing: border-box;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    margin: 5vh auto;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.modal-content canvas {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: block;
    border-radius: 4px;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5em;
    color: #333;
    cursor: pointer;
    z-index: 1000;
    font-weight: bold;
}

.photo-prev, .photo-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 28px;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 999;
    background-color: rgba(0,0,0,0.4);
}
.photo-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.photo-prev {
    left: 0;
}

table, table.inventory-table {
    width: 100%;
    border-collapse: collapse;
}
th, td, .inventory-table th, .inventory-table td {
    border: 1px solid #ddd;
    padding: 8px;
}
th, .inventory-table th {
    background-color: #f2f2f2;
}