/* General Styles */
body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #333;
}

/* Form Styling */
form#upload-inspection-images {
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    margin-top: 20px;
    max-width: 600px;
}

form#upload-inspection-images label {
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

form#upload-inspection-images input[type="file"] {
    margin-bottom: 15px;
}

form#upload-inspection-images input[type="submit"] {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
}

form#upload-inspection-images input[type="submit"]:hover {
    background-color: #005a8e;
}

/* Notification Messages */
.notice {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.notice-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notice-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Table Styling */
table.inspection-results {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table.inspection-results th, 
table.inspection-results td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table.inspection-results th {
    background-color: #f4f4f4;
    font-weight: bold;
}

table.inspection-results tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Additional Styles */
h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #0073aa;
}

/* Target only gallery within inspection results post type */
/* Ensure the gallery uses flexbox and limits the thumbnail size */
.single-inspection_results .inspection-images-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.single-inspection_results .inspection-images-gallery a {
    width: 150px;
    height: 150px;
    display: block;
    overflow: hidden;
}

.single-inspection_results .inspection-images-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image keeps its aspect ratio */
    display: block;
    border: 1px solid #ddd;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

/* Ensure the delete button is layered on top of the image */
.single-inspection_results .inspection-image-item {
    position: relative;
    display: inline-block;
    margin: 10px;
}

/* Delete button styled as a red cross, layered on top of the image */
.delete-button {
    background: none;
    border: none;
    color: red;
    font-size: 24px;
    font-weight: bold;
    position: relative;
    top: 0px;
    right: 00px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 10;
}

/* Hover effect for the delete button */
.delete-button:hover {
    color: darkred;
}

/* Fancybox navigation arrow styling */
.fancybox__nav {
    color: #fff !important;
}

.fancybox__arrow--left,
.fancybox__arrow--right {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex;
    justify-content: center;
    align-items: center;
}
