/* Common styles for table-based pages (Tenants, Projects, Users, Audit, etc.) */

/* Top bar layout */
.top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: .75rem;
    margin-bottom: 25px;
}

/* Table wrapper */
.table-wrapper {
    width: max-content;
}

/* Primary button style */
.primary-btn {
    background: #333f4f;
    color: #fff;
    border: 0;
    padding: 0 12px;
    height: 42px;
    font-size: .9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.primary-btn i {
    margin-right: 0;
}

.primary-btn:hover {
    background: #007fd3; /* LensColors.HardAccent */
    text-decoration: none;
    color: #fff;
}

.primary-btn.selected {
    background: #2b8dd8; /* LensColors.Accent */
}

/* Text filter / Search container */
.text-filter-container {
    position: relative;
    margin: 0;
    height: 42px;
}

.text-filter-container input {
    border-radius: 0;
    font-size: 14px;
    padding: 0 .5rem 0 2.6rem;
    height: 42px;
    box-sizing: border-box;
}

.text-filter-container .text-filter-icon {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: white;
}

/* Filter row */
.filter-row {
    margin-top: 10px;
    margin-bottom: 1em;
    position: relative;
    top: -20px;
}

.filter-row select {
    margin-right: 1em;
}

/* Status filter */
.statusFilter {
    display: flex;
}

.statusFilterItem:hover {
    opacity: 0.75 !important;
}

/* Lightbox / Modal styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.show {
    display: flex;
}

.lightbox-content {
    background-color: #222b35;
    padding: 30px;
    border-radius: 8px;
    max-width: 650px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    background: none;
    border: none;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #2b8dd8; /* LensColors.Accent */
    background: transparent !important;
    background-color: transparent !important;
}

/* Green button style */
.greenButton {
    background: #28a745;
    color: #fff;
    border: 0;
    padding: 10px 12px;
    font-size: .9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    cursor: pointer;
    margin-top: 10px;
}

.greenButton:hover {
    background: #218838;
    text-decoration: none;
    color: #fff;
}

.greenButton.disabled {
    background: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
}

.greenButton .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Action buttons */
a.actionButton {
    font-size: 15px;
    padding: 2px;
}

a.actionButton:hover {
    text-decoration: none;
}

/* Icon styling in links */
a i {
    text-decoration: none;
    color: inherit;
}

a:hover i {
    color: inherit;
}

/* Table row hover effects */
#unitTable tr:hover td,
#projectsTable tr:hover td,
#usersTable tr:hover td {
    background-color: #445263;
}

/* Date and action option hover effects */
.date-option:hover,
.action-option:hover {
    background-color: #2b8dd8;
}
