/* General Styling */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #2a2a2a; /* Mid-dark gray */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background-color: #1a1a1a; /* Very dark background */
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='17' viewBox='0 0 10 17' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 0 L10 2.5 V7.5 L5 10 L0 7.5 V2.5 Z M5 8.5 L10 11 V16 L5 17 L0 16 V11 Z' fill='none' stroke='%23222222' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 10px 17px; /* Adjust for even smaller hexagons */
    background-repeat: repeat;
}

h1, h2 {
    margin: 20px;
    color: #ffffff;
}
/* Add Changeling Neo font */
@font-face {
    font-family: 'Changeling Neo';
    src: url('../fonts/Changeling\ Neo\ Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Apply Changeling Neo to all headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Changeling Neo', sans-serif;
    font-weight: normal; /* Adjust weight if necessary */
    color: #ffffff; /* Optional: Keep the white color to match your theme */
}
button, .btn-large, .btn-small {
    font-family: 'Changeling Neo', sans-serif;
    font-size: 24px;
    padding: 15px 25px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    background-color: #0077c2 !important; /* Primary blue */
    color: white !important; /* Ensures text color remains consistent */
    border: none; /* Removes any unwanted borders */
    margin: 10px;
}
/* Other Styling for Overridden Button Classes */
button:focus, .btn-large:focus, .btn-small:focus {
    font-family: 'Changeling Neo', sans-serif;
    outline: none; /* Removes the default focus outline */
    box-shadow: 0 0 4px #0077c2; /* Adds a subtle focus shadow */
}
button:hover, .btn-large:hover, .btn-small:hover {
    font-family: 'Changeling Neo', sans-serif;
    background-color: #005bb5 !important; /* Lighter blue on hover */
}
.action-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.action-buttons .btn-small {
    height: 20%;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #0077c2;
    color: #fff;
    transition: background-color 0.3s;
}
button.btn-small.waves-effect.delete-btn {
    width: 80%;
}
.action-buttons .btn-small:hover {
    background-color: #005bb5;
}
/* In/Out Buttons */
#inBtn {
    background-color: #0077c2 !important; /* Primary blue */
    color: white;
    width: 100%;
}

#outBtn {
    background-color: #004b6b !important; /* Darker blue */
    color: white;
    width: 100%;
}

/* Technician List */
#technicianList {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

#searchInput {
    width: 100%;
    padding: 10px 40px 10px 10px; /* Add padding to accommodate the button */
    font-size: 16px;
    border: none;
    border-radius: 4px 0 0 4px;
    background-color: #333;
    color: #e0e6ed;
    outline: none;
    box-sizing: border-box;
}
/* Override Materialize input margin */
input:not([type]),
input[type=text]:not(.browser-default),
input[type=password]:not(.browser-default),
input[type=email]:not(.browser-default),
input[type=url]:not(.browser-default),
input[type=time]:not(.browser-default),
input[type=date]:not(.browser-default),
input[type=datetime]:not(.browser-default),
input[type=datetime-local]:not(.browser-default),
input[type=tel]:not(.browser-default),
input[type=number]:not(.browser-default),
input[type=search]:not(.browser-default),
textarea.materialize-textarea {
    margin-bottom: 0 !important; /* Remove margin with high specificity */
}
#scannerContainer {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 60%;
    height: 20%;
    background-color: black;
    border: 2px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    display: none; /* Hidden by default, shown only when scanner is initialized */
    z-index: 1000; /* Ensure it appears above other elements */
}

#scanItemButton {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001; /* Higher than the video but below other potential overlays */
    background-color: #26a69a; /* Materialize teal */
    color: white;
    border-radius: 5px;
    font-size: 1.2vw; /* Responsive font size relative to viewport width */
    cursor: pointer;
    transition: all 0.3s ease; /* Smooth transition for size adjustments */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    margin: 0.5vw 1vw; /* Responsive padding */
}
/* Media Queries for Smaller Screens */
@media (max-width: 1024px) {
    #scanItemButton {
        font-size: 25px; /* Fixed font size for smaller screens */
        height: 5%;
        margin: 2%;
        width: 15%;
    }
}

@media (max-width: 768px) {
    #scanItemButton {
        font-size: 20px;
        margin: 1%;
        height: 5%;
    }
}

@media (max-width: 480px) {
    #scanItemButton {
        font-size: 15px;
        padding: 6px 12px;
        width: 20%;
        margin: 2%;
    }
}s
#scanItemButton:hover {
    background-color: #00796b;
}

#scannerContainer video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the video fits the container */
}
#result {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
}
#searchInput {
    position: relative; /* Set relative positioning to anchor the button */
}
#suggestionBox, #searchWrapper {
    position: relative;
    margin-top: 20px;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 4px;
    background-color: #333;
}

#closeSuggestionBox {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0077c2;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

#closeSuggestionBox:hover {
    background-color: #005bb5;
}
.tech-btn {
    font-family: 'Changeling Neo', sans-serif;
    background-color: #3c3c3c;
    color: white;
    font-size: 18px;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 10px;
    width: 45%;
    max-width: 200px;
}

/* Table Styling */
#itemTable {
    width: 100%;
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
}

th, td {
    padding: 15px;
    font-size: 18px;
    border-bottom: 1px solid #444;
}

th {
    background-color: #3b3b3b; /* Mid-gray */
    font-weight: bold;
    color: #c7d5e0; /* Light blue-gray */
}

td {
    color: #e0e6ed; /* Light gray text */
}

/* Finish and Print Labels Buttons */
#finish-btn {
    background-color: #4caf50 !important; /* Green */
    color: white !important;
    font-size: 20px;
    margin-right: auto;
}

#print-labels-btn {
    background-color: #0077c2 !important; /* Blue */
    color: white !important;
    font-size: 20px;
    margin-left: auto;
}

/* Button Container for Finish and Print Labels */
.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    width: 100%;
    padding: 10px;
}
#cancelTransactionBtn {
    background-color: #e63946 !important; /* Blue */
    color: white !important;
    font-size: 20px;
    margin-left: auto;
}

#cancelTransactionBtn:hover {
    background-color: #d62828 !important; /* Slightly darker red on hover */
}
/* Hidden Input for Scanner */
#scannerInput {
    position: absolute;
    top: -1000px; /* Hide off-screen */
    opacity: 0;
}
#scanningScreen {
    margin: 20px auto;
    max-width: 800px;
    text-align: center;
    position: relative;
}
#technicianSelection {
    margin: 20px auto;
    max-width: 800px;
    text-align: center;
    position: relative;
}
/* Modal Styling */
.custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 90%;
    max-width: 400px;
    display: none; /* Hidden by default */
}

.modal.active {
    display: block; /* Ensure it shows when active */
}

.modal-content {
    background-color: #2a2a2a; /* Dark background to match the theme */
    color: #e0e6ed; /* Light gray text for contrast */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6); /* Shadow around content */
    text-align: center;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-evenly; /* Space out buttons evenly */
}

/* Modal Buttons */
.modal-btn {
    background-color: #0077c2 !important; /* Consistent primary blue */
    color: white !important;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-btn:hover {
    background-color: #005bb5 !important; /* Lighter blue on hover */
}
#searchModal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    z-index: 1000;
}

#searchModal.active {
    display: block; /* Display the modal when active */
}

#searchModal .modal-content {
    background-color: #2a2a2a; /* Matches dark theme */
    border-radius: 8px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.8);
    padding: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#searchModal .search-header {
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

#searchModal .search-header input {
    width: 100%;
    padding: 10px;
    font-size: 18px;
    color: #e0e6ed;
    background-color: #333;
    border: 1px solid #0077c2;
    border-radius: 4px;
    outline: none;
}

#searchModal .search-header .close {
    font-size: 20px;
    color: #e0e6ed;
    background: none;
    border: none;
    cursor: pointer;
}

#searchModal .search-header .close:hover {
    color: #c7d5e0;
}

#searchModal .suggestion-list {
    margin-top: 10px;
    overflow-y: auto;
    flex: 1;
    padding: 10px;
    border-radius: 4px;
    background-color: #333;
}

#searchModal .suggestion-item {
    padding: 10px;
    border-bottom: 1px solid #444;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#searchModal .suggestion-item:hover {
    background-color: #0077c2;
}

#searchModal .suggestion-item:last-child {
    border-bottom: none;
}
/* Popup Alert Styling */
.popup-alert {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #d32f2f; /* Red for alert */
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    z-index: 9999;
    opacity: 0;
    animation: slideIn 0.5s forwards, fadeOut 0.5s ease-in-out 9.5s forwards;
}

/* Slide-in animation for appearing */
@keyframes slideIn {
    from {
        transform: translateX(-50%) translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Fade-out transition */
@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Close Button Styling */
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #e0e6ed;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #c7d5e0;
}

/* Suggestion Box */
.suggestion-box {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.6);
    padding: 10px;
    z-index: 1000;
}

.suggestion-box input {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border-radius: 5px;
    border: 1px solid #0077c2;
    background-color: #333;
    color: #e0e6ed;
}

.suggestion-item {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

.suggestion-main-text {
    font-size: 16px;
    font-weight: bold;
    color: #FFF;
}

.suggestion-sub-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}
#logo-container {
    position: fixed; /* Ensures it remains at the top-left corner of the viewport */
    top: 0; /* Aligns to the very top of the screen */
    left: 0; /* Aligns to the very left of the screen */
    z-index: 0; /* Pushes it behind all other elements */
    padding: 10px; /* Adds some spacing around the logo */
    width: auto; /* Ensures it resizes dynamically */
    text-align: left !important;
}

#logo-container img {
    max-width: 80%; /* Sets a maximum width to adapt to screen size */
    height: auto; /* Maintains the aspect ratio */
    pointer-events: none; /* Prevents interactions with the logo */
}

/* Optional media queries to adjust logo size for different screen sizes */
@media (max-width: 1024px) {
    #logo-container img {
        max-width: 90%; /* Larger for medium screens */
    }
}

@media (max-width: 768px) {
    #logo-container img {
        max-width: 80%; /* Larger for smaller screens */
    }
}

@media (max-width: 480px) {
    #logo-container img {
        max-width: 50%; /* Larger for very small screens */
    }
}
#poNumberContainer {
    display: flex; /* Enables flexbox */
    flex-wrap: wrap; /* Allows wrapping if needed */
    gap: 10px; /* Space between inputs */
    justify-content: center; /* Center inputs on larger screens */
    align-items: center;
    margin: 10px;
}

/* Ensure inputs appear side by side on larger screens */
#poNumberContainer input {
    flex: 1; /* Distribute space evenly */
    min-width: 250px; /* Prevents excessive shrinking */
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #2a2a2a;
    color: white;
}

/* Make inputs stack vertically on smaller devices */
@media (max-width: 768px) {
    #poNumberContainer {
        flex-direction: column;
        align-items: stretch;
    }

    #poNumberContainer input {
        width: 100%;
        min-width: unset;
    }
}

#poNumber {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    color: #FFF;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #2a2a2a;
}

#poNumber:focus + label,
#poNumber:not(:placeholder-shown) + label {
    top: -20px;
    left: 5px;
    font-size: 14px;
    color: #0077c2;
}

label[for="poNumber"] {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 16px;
    color: #666;
    transition: all 0.2s ease-out;
    pointer-events: none;
}

#supplier {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    color: #FFF;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #2a2a2a;
}

#supplier:focus + label,
#supplier:not(:placeholder-shown) + label {
    top: -20px;
    left: 5px;
    font-size: 14px;
    color: #0077c2;
}

label[for="supplier"] {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 16px;
    color: #666;
    transition: all 0.2s ease-out;
    pointer-events: none;
}
/* Main container improvements */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Main section styling */
#main {
    background: rgba(42, 42, 42, 0.9);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    width: 100%;
    max-width: 800px;
}

/* Title styling */
#main h1 {
    font-family: 'Changeling Neo', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 40px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

/* Button container improvements */
.button-container {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

/* Main action buttons (In/Repair In) */
#inBtn, .repair-btn {
    font-family: 'Changeling Neo', sans-serif;
    font-size: 1.2rem;
    padding: 20px 40px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 119, 194, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

#inBtn {
    background: linear-gradient(135deg, #0077c2, #005bb5);
    color: white;
}

.repair-btn {
    background: linear-gradient(135deg, #26a69a, #00796b);
    color: white;
    box-shadow: 0 4px 15px rgba(38, 166, 154, 0.3);
}

#inBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 119, 194, 0.4);
}

.repair-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(38, 166, 154, 0.4);
}

/* Remove unused button styles */
#outBtn, #countBtn, #searchBtn, #repairManagementBtn {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    #main {
        padding: 20px;
        margin: 10px;
    }
    
    #main h1 {
        font-size: 2.5rem;
        margin-bottom: 30px;
    }
    
    .button-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    #inBtn, #outBtn {
        font-size: 1.5rem;
        padding: 15px 30px;
    }
    
    .repair-buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .repair-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    #main h1 {
        font-size: 2rem;
    }
    
    #inBtn, #outBtn {
        font-size: 1.2rem;
        padding: 12px 25px;
    }
}
