.emergelms-library-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1em;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #fff; /* White text for visibility on a dark background */
}

/* =========================
   TOOLBAR / CONTROLS STYLES
   ========================= */
.emergelms-controls {
    display: flex;             /* Place items in a horizontal row */
    align-items: center;       /* Vertically center them */
    justify-content: center;   /* Center the entire toolbar horizontally */
    gap: 1em;                  /* Spacing between the forms/buttons */
    margin-bottom: 1.5em;
    background: rgba(255, 255, 255, 0.1); /* Subtle overlay for contrast */
    padding: 0.75em 1em;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.emergelms-search-section {
    flex: 1;
    max-width: 500px; /* Kept longer width */
    pointer-events: auto !important; /* Ensure the section is interactive */
    position: relative;
    z-index: 1000;
}

.emergelms-search-form {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin: 0; /* Ensure no extra margin that might push elements */
    pointer-events: auto !important; /* Ensure the form is interactive */
    position: relative;
    z-index: 1000;
}

/* Clear Link */
.emergelms-clear-link {
    color: #bbb;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.emergelms-clear-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Inputs styling */
.emergelms-search-form input[type="text"] {
    padding: 0.75em 1em;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    line-height: normal;
    /* Ensure the input is interactive */
    pointer-events: auto !important;
    position: relative;
    z-index: 10000; /* Extremely high z-index to avoid overlap */
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

.emergelms-search-form input[type="text"] {
    flex: 1; /* Ensure the input takes up available space */
}

.emergelms-search-form input[type="text"]::placeholder {
    color: #bbb;
}

.emergelms-search-form input[type="text"]:focus {
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.1);
}

/* Search Button */
.emergelms-search-form button {
    padding: 0.75em 1.5em;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    line-height: normal;
}

.emergelms-search-form button:hover {
    background: #0056b3;
}

/* No Results Message */
.emergelms-no-results {
    font-size: 16px;
    color: #bbb;
    text-align: center;
    margin: 2em 0;
}

/* 
   =========================
   TILES + LAYOUT
   =========================
*/
.emergelms-tiles-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}

.emergelms-tile {
    width: 200px;
    height: 200px;
    margin: 0.5em;
    display: inline-block;
    vertical-align: top;
    position: relative;
}

.emergelms-tile.hidden {
    display: none; /* Hide tiles that don't match search criteria */
}

.emergelms-tile a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.emergelms-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: none;
}

/* Status Dot in top-right corner */
.status-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 1;
}

.status-dot.not-started {
    background-color: #808080; /* Medium gray for Not Started */
}

.status-dot.in-progress {
    background-color: orange;
}

.status-dot.completed {
    background-color: green;
}

/* Hover Overlay */
.emergelms-tile .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 5px;
    box-sizing: border-box;
}

.emergelms-tile:hover .overlay {
    opacity: 1;
}

.emergelms-tile .overlay .title {
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.emergelms-tile .overlay .status {
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.2;
    color: #fff; /* White text for all statuses */
    padding: 5px 10px; /* Plenty of padding around the text */
    border-radius: 4px; /* Rounded corners for the background */
}

.emergelms-tile .overlay .status.not-started {
    background-color: #808080; /* Medium gray background for Not Started */
}

.emergelms-tile .overlay .status.in-progress {
    background-color: orange;
}

.emergelms-tile .overlay .status.completed {
    background-color: green;
}

.emergelms-tile .overlay .ce-hours {
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.2;
    color: #fff;
}

/* Section Headers */
.emergelms-inprogress-section h2,
.emergelms-category-section h3 {
    color: #fff;
    margin-bottom: 0.5em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3); /* Minimal, modern underline */
    padding-bottom: 5px; /* Space between text and underline */
}

/* Add space around category sections */
.emergelms-inprogress-section,
.emergelms-category-section {
    margin: 2em 0; /* Increased space around sections */
}
