/* ========== GENERAL STYLES ========== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

header {
    background-color: #ffffff;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
}

header a {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

header a img {
    height: 90px;
}

.hamburger-menu {
    position: absolute;
    right: 20px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
}

/* ========== HERO SECTION ========== */
#hero {
    background: url('/images/mainpagehouse03.png') center/cover no-repeat;
    padding: 100px 20px;
    color: #fff;
    min-height: 300px;
    text-align: center;
    position: relative;
}

#hero h1 {
    font-size: 2.5em;
    margin: -30px 0 20px;
    z-index: 10;
    position: relative;
    color: #fff;
}

#hero p {
    font-size: 1.2em;
    margin-bottom: 40px;
    z-index: 10;
    position: relative;
}

.hero-buttons {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    max-width: 100%;
}

.hero-buttons a {
    background-color: #000;
    color: #fff;
    min-width: 140px;
    padding: 10px 20px;
    border: 2px solid #fff;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    white-space: nowrap;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hero-buttons a:hover {
    background-color: #808080;
    color: #fff;
}

/* ========== LAYOUT ========== */
#community-insights,
#login-section,
footer {
    text-align: center;
    padding: 20px;
}

#login-section {
    background-color: #f4f4f4;
    margin-top: -10px;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
}

/* ========== FORMS ========== */
.login-form,
.forgot-password-form,
.reset-password-form {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.login-form h2,
.forgot-password-form h2,
.reset-password-form h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
form input,
form select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

button[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #007BFF;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 10px;
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

.reset-link {
    display: block;
    margin-top: 10px;
    font-size: 0.9em;
    color: #007BFF;
    text-decoration: none;
}

.reset-link:hover {
    text-decoration: underline;
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input[type="password"],
.password-container input[type="text"] {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 2;
}

@media (min-width: 768px) {
    .toggle-password {
        right: 15px;
    }
}

/* ========== MODALS ========== */
.modal,
#addWalletModal {
    display: none;
    position: fixed;
    z-index: 2000; /* Increase this value if needed */
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Ensure background is dark enough */
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
}

.modal-content .close,
.close-wallet {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    padding: 10px;
}

.modal-content .close:hover,
.close-wallet:hover {
    color: #000;
}

/* Style the Add Device button inside the modal to match the black/white theme */
#add-device-form button[type="submit"] {
    background-color: #000;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-top: 10px;
}

#add-device-form button[type="submit"]:hover {
    background-color: #808080;
    color: #fff;
    border-color: #fff;
}

/* Image Modal Styles */
#imageModal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Ensure it appears above other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* Black background with opacity */
}

.modal-content-image {
    display: block;
    margin: auto;
    max-width: 90%; /* Limit the image width */
    max-height: 90%; /* Limit the image height */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-image-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-image-modal:hover {
    color: #ccc;
}

/* ========== BUTTONS ========== */
.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin: 20px 0;
}

.add-device-btn,
.add-wallet-btn {
    background-color: #000;
    color: #fff;
    min-width: 140px;
    padding: 10px 20px;
    border: 2px solid #fff;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 16px;
    white-space: nowrap;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    width: auto;
}

.add-device-btn:hover,
.add-wallet-btn:hover {
    background-color: #808080;
}

/* ========== TABLE STYLES ========== */
.table-container {
    width: 100%;
    overflow-x: auto !important; /* Allow horizontal scrolling if needed */
    display: block !important; /* Prevent parent container from affecting table layout */
    max-width: 100%; /* Ensure the container does not exceed the viewport width */
    margin: 0 auto; /* Center the container */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed; /* Ensure consistent column widths */
    max-width: 100%; /* Ensure the table does not exceed the container width */
    word-wrap: break-word; /* Prevent long text from breaking the layout */
    border-collapse: collapse; /* Merge adjacent borders for a cleaner look */
}

th, td {
    padding: 10px;
    text-align: center; /* Center-align both headers and data cells */
    border: 1px solid #ccc; /* Add a light gray border around each cell */
    word-wrap: break-word; /* Prevent text overflow */
    white-space: nowrap; /* Prevent wrapping of text in narrow columns */
}

/* Specific Styles for #device-list-table */
#device-list-table {
    width: 100% !important; /* Ensure the table spans the full width */
    border-collapse: collapse !important;
    table-layout: fixed !important; /* Force fixed column widths */
    margin-bottom: 20px !important;
    display: table !important; /* Ensure the table behaves as a table */
}

#device-list-table th, #device-list-table td {
    padding: 10px !important;
    border: 1px solid #ccc !important; /* Add borders for clarity */
    text-align: center !important; /* Center-align both headers and data cells */
    vertical-align: middle !important; /* Align content to the middle */
    word-wrap: break-word !important; /* Prevent text overflow */
    display: table-cell !important; /* Ensure cells behave as table cells */
}

#device-list-table th {
    background-color: #e0e0e0 !important; /* Add a background color for headers */
    font-weight: bold !important;
}

#device-list-table td {
    background-color: transparent !important; /* Allow row-level shading to show */
}

/* Make the header row of the "Your Devices" table sticky */
#device-list-table thead th {
    position: sticky; /* Make the header row sticky */
    top: 0; /* Stick to the top of the container */
    z-index: 10; /* Lower than modal's z-index */
    background-color: #e0e0e0; /* Match the header background color */
    border-bottom: 2px solid #ccc; /* Add a border for clarity */
}

/* Ensure shading is applied to every other row in the "Your Devices" table */
#device-list-table tbody tr:nth-child(even) {
    background-color: #f9f9f9 !important; /* Light gray background for even rows */
    color: #333; /* Ensure text color is visible */
}

/* Optional: Add hover effect for rows */
#device-list-table tbody tr:hover {
    background-color: #eaeaea !important; /* Slightly darker gray on hover */
}

/* Debugging: Add a border to all rows to verify the rule is applied */
#device-list-table tbody tr {
    border: 1px solid red; /* Temporary border for debugging */
}

/* Prevent stacking of columns in Your Devices Table on mobile */
@media (max-width: 768px) {
    #device-list-table {
        display: table !important; /* Ensure the table remains a table */
    }

    #device-list-table th, #device-list-table td {
        display: table-cell !important; /* Prevent stacking */
        text-align: center !important; /* Keep text alignment consistent */
    }
}

/* User Profile Table Styles */
.user-profile-table {
    width: 100% !important; /* Ensure the table spans the full width */
    border-collapse: collapse !important;
    table-layout: fixed !important; /* Force fixed column widths */
    margin-bottom: 20px !important;
    display: table !important; /* Ensure the table behaves as a table */
}

.user-profile-table th, .user-profile-table td {
    padding: 10px !important;
    border: 1px solid #ccc !important; /* Add borders for clarity */
    text-align: left !important; /* Align text to the left */
    vertical-align: top !important; /* Align content to the top */
    word-wrap: break-word !important; /* Prevent text overflow */
    display: table-cell !important; /* Ensure cells behave as table cells */
    width: 50% !important; /* Force each column to take up 50% of the width */
}

.user-profile-table th {
    background-color: #e0e0e0 !important; /* Add a background color for headers */
    font-weight: bold !important;
}

.user-profile-table td {
    background-color: transparent !important; /* Allow row-level shading to show */
}

/* Ensure proper wrapping for the "Values" column in the User Profile table */
.user-profile-table td:nth-child(2) {
    word-wrap: break-word; /* Break long words to wrap within the cell */
    white-space: normal; /* Allow text to wrap to the next line */
    overflow-wrap: break-word; /* Ensure compatibility with modern browsers */
    max-width: 300px; /* Optional: Limit the maximum width of the column */
}

/* Ensure shading is applied to every other row in the "User Profile" table */
.user-profile-table tbody tr:nth-child(even) {
    background-color: #f9f9f9 !important; /* Light gray background for even rows */
    color: #333; /* Ensure text color is visible */
}

/* Optional: Add hover effect for rows in the "User Profile" table */
.user-profile-table tbody tr:hover {
    background-color: #eaeaea !important; /* Slightly darker gray on hover */
}

/* Prevent stacking of columns in User Profile Table on mobile */
@media (max-width: 768px) {
    .user-profile-table {
        display: table !important; /* Ensure the table remains a table */
    }

    .user-profile-table th, .user-profile-table td {
        display: table-cell !important; /* Prevent stacking */
        width: 50% !important; /* Ensure each column takes up 50% of the width */
        text-align: left !important; /* Keep text alignment consistent */
    }
}

/* Responsive Behavior for User Profile Table */
@media (max-width: 768px) {
    .user-profile-table th, .user-profile-table td {
        font-size: 14px; /* Reduce font size for smaller screens */
    }
}

/* Responsive Behavior */
@media (max-width: 768px) {
    table {
        table-layout: auto; /* Allow columns to adjust based on content */
    }

    th, td {
        font-size: 14px; /* Reduce font size for smaller screens */
    }
}

/* Optional: Add hover effect for rows */
tbody tr:hover {
    background-color: #f1f1f1; /* Highlight row on hover */
}

/* Ensure proper table layout for "Your Devices" */
#device-list-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed !important; /* Force fixed layout */
    word-wrap: break-word;
}

#device-list-table th, #device-list-table td {
    text-align: center; /* Center-align both headers and data cells */
    padding: 10px;
    border: 1px solid #ccc; /* Add borders for clarity */
    vertical-align: middle;
    word-wrap: break-word;
}

/* Enforce structure for Your Profile table */
.user-profile-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    word-wrap: break-word;
}

.user-profile-table th, .user-profile-table td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
}

/* Responsive behavior for "Your Devices" table */
@media (max-width: 768px) {
    #device-list-table {
        table-layout: auto; /* Allow columns to adjust based on content */
    }

    #device-list-table th, #device-list-table td {
        font-size: 14px; /* Reduce font size for smaller screens */
    }
}

/* Optional: Add hover effect for rows */
#device-list-table tbody tr:hover {
    background-color: #f1f1f1; /* Highlight row on hover */
}

/* Ensure internal tables (like "Your Devices") remain row-based */
.table-container table {
    width: 100%; /* Ensure internal tables span the full width */
    table-layout: auto; /* Allow internal tables to adjust based on content */
}

.table-container th,
.table-container td {
    text-align: left; /* Keep text alignment consistent */
}



/* ========== STATUS SECTION ========== */
#user-status-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}
#device-list-section h2 {
    text-align: center;
}

#user-status-section h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
}

.user-badge-icon {
    width: 40px;
    height: 40px;
}

.table-scroll {
    max-height: 270px; /* Limit height to ~6 rows */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #ddd; /* Optional: Add a border for clarity */
}

.table-scroll table {
    width: 100%; /* Ensure the table spans the full width */
    border-collapse: collapse; /* Ensure proper table styling */
}

/* Keep row styles consistent */
.table-scroll td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

/* Optional: Keep header aligned with scroll body */
.table-container table th,
.table-scroll table td {
    text-align: center;
}

/* Limit the height of the "Your Devices" table and enable vertical scrolling */
#device-list-section .table-container {
    max-height: 270px; /* Limit height to approximately 6 rows */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #ddd; /* Optional: Add a border for clarity */
}

/* Ensure the table spans the full width of the container */
#device-list-table {
    width: 100%;
    table-layout: fixed; /* Ensure consistent column widths */
}

/* Ensure the "Your Devices" table container fits within the parent cell */
#device-list-section {
    width: 100%; /* Ensure the section spans the full width of the parent cell */
    box-sizing: border-box; /* Include padding and borders in the width calculation */
}

#device-list-section .table-container {
    max-width: 100%; /* Ensure the container does not exceed the parent width */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #ddd; /* Optional: Add a border for clarity */
    margin: 0 auto; /* Center the container */
}

/* Ensure the table spans the full width of the container */
#device-list-table {
    width: 100%; /* Ensure the table spans the full width of the container */
    table-layout: fixed; /* Ensure consistent column widths */
}

/* Prevent table cells from exceeding the container width */
#device-list-table th, #device-list-table td {
    word-wrap: break-word; /* Prevent text overflow */
    white-space: normal; /* Allow text to wrap within cells */
}

/* Fix table behavior on mobile devices */
@media (max-width: 768px) {
    #device-list-section .table-container {
        max-width: 100%; /* Ensure the container fits within the viewport */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    #device-list-table {
        width: 100%; /* Ensure the table fits within the container */
    }
}

/* ========== CHART CONTAINERS ========== */
.chart-container {
    width: 100%;
    max-width: 100%;
    height: 300px;
}

@media (max-width: 768px) {
    .chart-container {
        height: 200px;
    }
}


    .modal-content {
        width: 90%;
    }

    .user-profile-table td,
    #device-list-table td {
        font-size: 14px;
        padding: 6px;
    }

    #hero {
        padding: 50px 10px;
    }

    #hero h1 {
        font-size: 2em;
    }

    #hero p {
        font-size: 1em;
    }


@media (min-width: 769px) {
    #hero {
        min-height: 600px;
    }
}

@media (max-width: 768px) {
    #hero {
        min-height: 200px;
    }
}



/* ========== UTILITIES ========== */
.header-black {
    background-color: #000;
    color: #fff;
    padding: 10px;
}

/* Responsive Table Layout */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    table-layout: fixed; /* Ensure equal column widths */
}

.responsive-table td {
    padding: 15px;
    vertical-align: top;
    border: 1px solid #ccc;
    width: 50%; /* Set each column to take up 50% of the width */
}

@media (max-width: 768px) {
    .responsive-table td {
        display: block;
        width: 100%; /* Full width for single-column view */
        border: none;
        border-bottom: 1px solid #ddd;
    }

    /* Ensure internal tables (like "Your Devices") remain row-based */
    .responsive-table td .table-container table {
        width: 100%; /* Ensure internal tables span the full width */
        table-layout: auto; /* Allow internal tables to adjust based on content */
    }

    .responsive-table td .table-container th,
    .responsive-table td .table-container td {
        text-align: left; /* Keep text alignment consistent */
    }
}

/* Placeholder for photo section */
#photo-placeholder-section {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
}

/* Apply box-sizing globally to include padding and borders in width/height */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Ensure no extra padding or margins cause overflow */
html, body {
    margin: 0;
    padding: 0;
}

/* Ensure shading is applied to every other row in all tables */
table tbody tr:nth-child(even) {
    background-color: #f9f9f9 !important; /* Light gray background for even rows */
    color: #333; /* Ensure text color is visible */
}

table tbody tr:nth-child(odd) {
    background-color: #ffffff !important; /* White for odd rows */
}

/* Optional: Add hover effect for rows in all tables */
table tbody tr:hover {
    background-color: #eaeaea !important; /* Slightly darker gray on hover */
}

/* Debugging: Add a border to all rows to verify the rule is applied */
table tbody tr {
    border: 1px solid red; /* Temporary border for debugging */
}

/* Ensure individual cells don't override row shading */
table td {
    background-color: transparent !important;
}


/* ===== CLEAN & RESPONSIVE STYLES FOR USER INFO TABLE ===== */

#user-info-section {
    color: #333;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Shared desktop/mobile styles */
.user-info-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 20px;
}

.user-info-table th,
.user-info-table td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
    color: #333;
}

.user-info-table th {
    background-color: #e0e0e0;
    font-weight: bold;
}

/* Zebra striping for visual clarity */
.user-info-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.user-info-table tbody tr:hover {
    background-color: #eaeaea;
}

/* Responsive layout: keep two-column grid on mobile */
@media (max-width: 768px) {
    .user-info-table {
        display: table;
        width: 100%;
    }

    .user-info-table th,
    .user-info-table td {
        display: table-cell;
        width: 50%;
        text-align: left;
        font-size: 14px;
    }

    .user-info-table tr {
        display: table-row;
    }

    #user-info-section h2 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
}

/* Styles for the Device Details section */
#device-details-section {
    color: #333;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.device-details-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 20px;
}

.device-details-table th,
.device-details-table td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
    color: #333;
}

.device-details-table th {
    background-color: #e0e0e0;
    font-weight: bold;
}

/* Zebra striping for visual clarity */
.device-details-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.device-details-table tbody tr:hover {
    background-color: #eaeaea;
}

/* Responsive layout for Device Details */
@media (max-width: 768px) {
    .device-details-table {
        display: table; /* Ensure the table remains a table */
        width: 100%;
    }

    .device-details-table th,
    .device-details-table td {
        display: table-cell; /* Prevent stacking */
        width: 50%; /* Ensure each column takes up 50% of the width */
        text-align: left; /* Align text to the left */
        font-size: 14px; /* Reduce font size for smaller screens */
    }

    .device-details-table tr {
        display: table-row; /* Ensure rows remain rows */
    }

    #device-details-section h2 {
        font-size: 1.2em; /* Adjust heading size for mobile */
        margin-bottom: 10px;
    }
}

/* ========== IMAGE GALLERY ========== */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.image-gallery img {
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-gallery img:hover {
    transform: scale(1.1);
}

/* Responsive behavior for the image gallery */
@media (max-width: 768px) {
    .image-gallery img {
        max-width: 100px;
        max-height: 100px;
    }
}

/* Edit Device Images Modal Styles */
.edit-device-images-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.edit-device-images-btn:hover {
    background-color: #555;
}

.image-edit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fafafa;
    flex-wrap: wrap;
    gap: 10px;
}

.image-edit-row label {
    font-weight: bold;
    min-width: 180px;
    flex-shrink: 0;
    font-size: 14px;
}

.image-preview-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    min-height: 60px;
    gap: 15px;
}

.current-image-thumbnail {
    max-width: 80px;
    max-height: 60px;
    border-radius: 5px;
    border: 2px solid #ddd;
    object-fit: cover;
}

/* Inline preview styling for new images */
.inline-image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.new-image-preview {
    max-width: 80px;
    max-height: 60px;
    border-radius: 5px;
    border: 2px solid #007bff;
    object-fit: cover;
}

.preview-label {
    font-size: 10px;
    color: #007bff;
    font-weight: bold;
    text-align: center;
}

.remove-preview-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 10px;
    cursor: pointer;
    margin-top: 2px;
}

.remove-preview-btn:hover {
    background-color: #c82333;
}

.image-buttons {
    display: flex;
    flex-direction: row;
    gap: 5px;
    min-width: 140px;
    flex-wrap: wrap;
}

.replace-image-btn, .delete-image-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background-color 0.3s ease;
    background-color: #333;
    color: white;
    min-width: 60px;
}

.replace-image-btn:hover, .delete-image-btn:hover {
    background-color: #555;
}

.delete-image-btn {
    background-color: #dc3545;
}

.delete-image-btn:hover {
    background-color: #c82333;
}

.save-images-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.save-images-btn:hover {
    background-color: #555;
}

.cancel-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.cancel-btn:hover {
    background-color: #555;
}

/* Enhanced Edit Device Images Modal Styling */
#editDeviceImagesModal .modal-content {
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
}

#edit-images-device-info {
    background-color: #f0f0f0;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
}

#current-images-section h3,
#upload-images-section h3 {
    margin-bottom: 15px;
    margin-top: 20px;
    color: #333;
    font-size: 16px;
}

#upload-images-section {
    margin-top: 25px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

#new-images-preview {
    margin-top: 10px;
    margin-bottom: 15px;
}

.close-edit-images {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    padding: 5px;
    line-height: 1;
}

.close-edit-images:hover {
    color: #000;
}

/* Edit Device Details Button Styles */
.edit-device-details-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.edit-device-details-btn:hover {
    background-color: #555;
}

/* Save Details Button Styles */
.save-details-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.save-details-btn:hover {
    background-color: #555;
}
