/* Picture Feature Styles */
.picture-thumbnail-wrapper {
    position: relative;
    border: 1px solid #ddd;
    padding: 3px;
    background-color: #f9f9f9;
    /* width: 330px; Removed to allow auto-width based on content and height */
    height: 200px; /* Adjusted height for wrapper */
    max-width: 90vw; /* Max width relative to viewport width */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px; /* Add some margin around each thumbnail */
}
.picture-thumbnail {
    max-width: 100%; /* Ensure image does not exceed wrapper's calculated width */
    height: 100%; /* Fill wrapper height */
    object-fit: contain; /* Show entire image, adjust width proportionally */
    cursor: pointer;
    display: block;
}
.delete-picture-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545; /* Bootstrap danger red */
    color: white;
    border: 1px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    line-height: 22px; 
    text-align: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10; /* Ensure it's above the thumbnail image */
}
.delete-picture-btn:hover {
    background-color: #c82333; /* Darker red on hover */
}

/* Video Feature Styles */
.video-thumbnail-wrapper {
    position: relative;
    border: 1px solid #ddd;
    padding: 3px;
    background-color: #f9f9f9;
    width: 100%;
    /* width: 330px; */
    /* height: 200px; */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
}
.video-thumbnail {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.delete-video-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border: 1px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}
.delete-video-btn:hover {
    background-color: #c82333;
}

#largePicturePreview {
    border-radius: 0.25rem; /* Match Bootstrap styling */
    max-width: 100%;
    /* max-height: 400px; Removed */
    object-fit: contain;
    border: 1px solid #ccc; 
    margin-bottom: 10px;
}
#picturePreviewContainer {
    text-align: center; /* Center the large preview image */
}

/* Camera View Specific Styling */
#cameraView {
    /* display:none; is handled by JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    z-index: 1055; /* Ensure it's above Bootstrap modals (1050) if any */
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
}
#cameraStream {
    width: 90vw; /* 90% of viewport width */
    /* max-width: 600px; Removed to allow full viewport width utilization */
    height: 80vh; /* 80% of viewport height */
    border: 1px solid #fff;
    background-color: #333; /* Dark background for video element */
    object-fit: cover; /* Ensure entire camera view is visible and fills height */
    /* aspect-ratio: 4 / 3; Removed as width/height are now viewport relative */
}
#pictureCanvas {
    display: none; /* Canvas is for processing, not direct display */
}

/* Alert Container for dynamic flash messages */
#alertContainer {
    position: fixed;
    top: 80px; /* Adjust if you have a fixed navbar, e.g., 60px + 20px padding */
    right: 20px;
    z-index: 1060; /* Above camera view */
    width: 300px; /* Max width for alerts */
}

/* Styling for "empty table" or "no items" messages */
.emptytable {
    text-align: center;
    padding: 20px;
    color: #6c757d; /* Bootstrap secondary text color */
    border: 1px dashed #ced4da; /* Bootstrap input border color */
    border-radius: .25rem; /* Bootstrap border-radius */
    margin-top: 15px;
    margin-bottom: 15px;
}

.emptytable p {
    margin-bottom: 0;
    font-size: 1.1rem;
}

:root {
    --primary-color: #007bff; /* Google Blue */
    --secondary-color: #1F1F1F; /* Charcoal */
    --white-color: #ffffff;
    --background-color: #f8f9fa; /* Light grey background for overall clean look */
}

body {
    font-family: sans-serif, system-ui;
    background-color: var(--background-color);
    letter-spacing: 0.3px;
}

.container {
    margin-top: 50px;
}

.content {
    margin-left: 14rem; /* Default for desktop nav */
    margin-right: 1rem;
    margin-top: 6rem; /* Adjusted margin-top for both views */
}

/* Header and Logo */
header {
    position: fixed;
    top:0;
    border-bottom: solid;
    border-width: thin;
    padding-bottom: 1rem;
    padding-top: 0.5rem;
    padding-right: 0.5rem;
    width: 100%;
    background: var(--white-color);
    z-index: 99;
}

.logo {
    height:3.5rem;
}

/* Sidebar Navigation (Desktop) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 200px;
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding-top: 20px;
    margin-top: 3.8rem;
    z-index: 1;
    overflow-y: auto;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    border-bottom: solid;
    border-width: thin;
    border-color: #555;
}

.sidebar li a, .sidebar .nav-drawer-toggle {
    display: block;
    color: var(--white-color);
    text-decoration: none;
    padding: 10px 15px;
    transition: background-color 0.3s;
}

.sidebar li a:hover, .sidebar .nav-drawer-toggle:hover {
    background-color: #555;
}

.sidebar li a.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.subactive {
    background-color: #555;
    color: var(--white-color);
}

/* Nav Drawer (Collapsible) */
.sidebar .nav-drawer {
    display: none;
}

.sidebar .nav-drawer.open {
    background-color: #28292A;
    display: block;
}

.sidebar .nav-drawer li a {
    padding-left: 30px;
}

.nav-drawer-toggle {
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu-toggle {
    font-size: 2rem !important;
    font-weight: 600;
    display: none;
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    background: none;
    border: none;
    font-size: 24px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    color: var(--white-color);
    z-index: 5000;
    padding-top: 80px;
    text-align: center;
}

.mobile-menu.open {
    display: block;
    overflow: scroll;
    scrollbar-width: thin;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
}

.mobile-menu li {
    border-bottom: solid;
    border-width: thin;
    border-color: #555;
}

.mobile-menu li a, .mobile-menu .nav-drawer-toggle {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 15px;
    font-size: 2em;
}

.mobile-menu li a:hover, .mobile-menu .nav-drawer-toggle:hover {
    background-color: #555;
}

.mobile-menu li a.active {
    background-color: var(--primary-color);
    color: white;
}

.subactive {
    background-color: #555;
    color: white;
}

.mobile-menu .nav-drawer {
    display: none;
}

.mobile-menu .nav-drawer.open {
    background-color: #28292A;
    display: block;
}

.mobile-menu-close {
    font-size: 3rem !important;
    font-weight: 600;
    position: absolute;
    top: 0;
    left: 20px;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
}

/* Flash Messages (Alerts) */
.alert {
    margin-top: 1rem;
}

/* Login Page Specific Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background-color);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    text-align: center;
    box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2),
                0px 4px 5px 0px rgba(0, 0, 0, 0.14),
                0px 1px 10px 0px rgba(0, 0, 0, 0.12);
    background-color: var(--white-color);
    border-radius: 0.5rem;
}

.login-logo {
    width: 15rem;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-control {
    border-radius: 0.25rem;
}

.form-check {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    height: 1rem;
    width: 1rem;
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3; /* Darker blue on hover */
    border-color: #0056b3;
}

/* Style for required input, select, and textarea fields that are currently invalid (e.g., empty) */
input[required]:invalid,
select[required]:invalid,
textarea[required]:invalid {
    border-color: red !important; /* Using !important to ensure override if necessary, but use with caution */
    /* Alternatively, use outline for a less layout-intrusive highlight: */
    /* outline: 1px solid red; */
    /* outline-offset: 0; */
}

/* Optional: Style for required fields once they become valid (e.g., filled) */
/*
input[required]:valid,
select[required]:valid,
textarea[required]:valid {
    border-color: green;
}
*/

/* Table Styling for Users Page */
.table {
    margin-top: 0.5rem;
    border-collapse: collapse;
    width: 100%;
}

.table.sortable-table thead th {
    cursor: pointer;
}

.table.sortable-table thead th.asc::after {
    content: " ▲";
}

.table.sortable-table thead th.desc::after {
    content: " ▼";
}

.table thead th {
    background-color: var(--secondary-color); /* Dark background for header */
    color: var(--white-color); /* White text for header */
    /* padding: 0.75rem; */
    text-align: left;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05); /* Light blue hover */
}

.table tbody td {
    /* padding: 0.75rem; */
    vertical-align: middle;
}

.table .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.table .btn-icon {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
}

.table .btn-icon:hover {
    color: var(--secondary-color);
}

.add-user-btn {
    width: auto; /* Allow button to size to content */
    display: inline-block; /* Ensure it doesn't take full width */
}

/* Table specific styles from Portal */
.table .actions {
    min-width: 102px;
    max-width: 102px;
    width: 102px;
}

.action-icon {
    margin-right: 5px;
}

.green-circle {
    width: 1rem;
    height: 1rem;
    background-color: #3AAB58; /* Green from portal style */
    border-radius: 50%;
    display: inline-block;
}

.red-circle {
    width: 1rem;
    height: 1rem;
    background-color: #EB493B; /* Red from portal style */
    border-radius: 50%;
    display: inline-block;
}

.settings-logo {
    height: 2.5rem;
    vertical-align: middle;
    /* margin-left: 1rem; */
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        display: none; /* Hide desktop sidebar on mobile */
    }

    .mobile-menu-toggle {
        display: block; /* Show hamburger menu on mobile */
    }

    .content {
        margin-left: 1rem; /* No left margin when sidebar is hidden */
        margin-top: 6rem; /* Adjusted margin-top for mobile */
    }

    .logo {
        max-width: 80%; /* Max width for logo on mobile */
    }


}
.collapse-icon {
    transition: transform 0.3s ease-in-out;
}
.collapse-icon.rotated {
    transform: rotate(-180deg);
}
.color-swatch-display {
    width: 200px;
    height: 200px;
    border: 1px solid #ccc;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}
.color-swatch-container {
    display: none;
    background-color: white;
    border: 1px solid #ddd;
    padding: 10px;
    z-index: 1000;
    /* display: flex; /* This will be set by JavaScript when needed */
    flex-wrap: wrap; /* Allow items to wrap to multiple rows */
    justify-content: flex-start; /* Align items to the start of the container */
    gap: 0; /* Space between items - REMOVED */
}
.color-swatch-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0; /* REMOVED */
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0; /* REMOVED */
}
.color-swatch-option:hover {
    border: 1px solid var(--primary-color);
}
.color-swatch-container img {
    width: 120px; /* INCREASED SIZE */
    height: 120px; /* INCREASED SIZE */
    margin-bottom: 5px; /* Space between image and text */
}
.color-info-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.color-code-popup {
    font-size: 0.7em; /* Smaller font size */
    font-weight: bold; /* Bold text */
}
.color-designation-popup {
    font-size: 0.6em; /* Smaller font size */
}
.order-total {
    font-size: 1.2em;
    font-weight: bold;
    color: #3AAB58; /* Google Green */
    text-align: left;
}
/* Styles for the order totals display on configure_order.html */
.order-totals-container {
    font-size: 1.1rem;
    color: #000000;
    text-align: left;
    padding: 15px;
    border: 1px solid #e0e0e0;
    background-color: #ffffff; /* Changed to white */
    border-radius: 5px;
    margin-bottom: 20px;
}

.order-totals-container div#display_grand_total_container span#display_grand_total { /* Target the grand total span specifically */
    font-size: 1.3rem; /* Larger font size for grand total */
    font-weight: bold; /* Make grand total bold */
}

.order-totals-container div {
}

.order-totals-container hr {
    margin-top: 10px;
    margin-bottom: 10px;
    border-top: 1px solid #ccc;
}

/* Text color utility classes */
.text-hdh-green {
    color: #28a745; /* Bootstrap success green */
}

.text-hdh-red {
    color: #dc3545; /* Bootstrap danger red */
}

.text-hdh-black {
    color: #000000; /* Explicit black */
}
/* Styling for collapsible headers on configure_order.html */
.collapsible-header-styling {
    background-color: aliceblue;
    padding: 1rem;
}
.go-to-client-btn {
    padding: 0.15rem 0.5rem; /* Make button thin */
    font-size: 0.8em; /* Smaller font size */
    vertical-align: middle; /* Align with text */
    margin-left: 10px; /* Space from the label */
}

/* Maintenance Task Card Styles */
.task-card {
    border: 1px solid #dee2e6; /* Light grey border, similar to Bootstrap cards */
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: .25rem; /* Standard Bootstrap border-radius */
    background-color: #fff; /* White background for the card */
    position: relative; /* For absolute positioning of the remove button */
    transition: border-left-color 0.3s ease-in-out; /* Smooth transition for status color */
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem; /* Space between title and fields */
}

.task-card-title {
    font-size: 1.15rem; /* Slightly larger title */
    font-weight: 500; /* Medium weight title */
    margin-bottom: 0; /* Remove default margin from h5 if used */
}

.task-fields .form-label {
    margin-bottom: .25rem; /* Smaller margin for labels within tasks */
    font-size: 0.875em; /* Slightly smaller label text */
}

.task-fields .form-select,
.task-fields .form-control {
    font-size: 0.875em; /* Smaller font for inputs/selects */
}

/* Status indicator borders */
.task-card.status-not-started {
    border-left: 15px solid #dc3545 !important; /* Red for Not Started */
}

.task-card.status-in-progress {
    border-left: 15px solid #ffc107 !important; /* Yellow for In-Progress */
}

.task-card.status-complete {
    border-left: 15px solid #28a745 !important; /* Green for Complete */
}

/* Ensure task notes textarea takes full width */
.task-notes-container .form-control {
    width: 100%;
}

/* Quick Action Buttons */
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 15px; /* Smaller padding */
    min-width: 80px; /* Smaller minimum width */
    height: 80px; /* Smaller fixed height */
    font-size: 0.9rem; /* Smaller font size */
    font-weight: bold;
    color: var(--white-color); /* White text */
    background-color: #343a40; /* Off-black color */
    border: 1px solid #343a40;
    border-radius: 3.4rem; /* Slightly less rounded corners */
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Smaller shadow */
}

.quick-action-btn:hover {
    background-color: #0055FF; /* Blue from provided image on hover */
    border-color: #0055FF;
    transform: translateY(-1px); /* Smaller lift effect on hover */
    color: var(--white-color); /* Keep text white on hover */
}

.quick-action-btn .quick-action-icon {
    font-size: 1.7rem; /* Smaller icon size */
    margin-bottom: 5px; /* Smaller space between icon and text */
    color: var(--white-color); /* Ensure icon is white */
}

.quick-action-btn span {
    display: block; /* Ensure text is on its own line */
    margin-top: 0; /* Remove extra margin */
    font-size: 10px;
}

/* Dropdown specific styles for quick action buttons */
.quick-action-btn.dropdown-toggle {
    /*padding-right: 30px;*/ /* Make space for the caret */
}

.quick-action-btn.dropdown-toggle::after {
    margin-left: 0.5em; /* Adjust caret position */
    vertical-align: middle;
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.gemini-autofill {
    background-color: black;
    border-radius: 1rem;
    width: 100%;
    text-decoration: none;
    display: flex;
    flex-direction: row;
    align-items:center;
    padding-bottom: 5px;
    margin-bottom: 1rem;
    justify-content:center;
}

.gemini-autofill span {
    color: white;
    text-decoration: none;
    font-size: 23px;
    padding-top: 10px;
}

.gemini-autofill img {
    width: 95px;
    margin-left: 3px;
    margin-right: 3px;
}

/* Custom styles for Select2 */
.select2-container .select2-selection--single {
    /* height: calc(2.25rem + 2px); */
    border: 1px solid #ced4da;
    border-radius: .25rem;
    height: 36px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    /* line-height: calc(2.25rem + 2px); */
    padding-left: .75rem;
    line-height: 36px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    /* height: calc(2.25rem + 2px); */
    right: .75rem;
    height: 36px !important;
}

.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: .25rem;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da;
    border-radius: .25rem;
}

.select2-container {
    width: 100% !important;
}


.bg-purple {
    background-color: purple;
    color: white;
}

.bg-grey {
    background-color: grey;
}