/* Module container */
.module-container {
    padding: 20px;
    line-height: 1.6;
}

/* Logo styling */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    width: 60px;
    height: auto;
}

/* Card containers */
.card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Form styling */
.form-columns {
    display: flex;
    gap: 1.5rem;
}

.form-column {
    flex: 1;
}

form label {
    display: block;
    margin-bottom: 0.6rem;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

fieldset {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

fieldset label {
    display: inline-block;
    margin-right: 1rem;
    font-weight: normal;
}

fieldset input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

.form-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Search and filter */
.filter-card {
    background-color: var(--background-light);
}

#searchBar, #filterBar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

#searchBar {
    border-bottom: 1px solid var(--border-color);
}

#searchQuery {
    flex-grow: 1;
}

#searchResults {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#filterBar label, #searchBar label {
    font-size: 0.9rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

#filterBar input, #searchBar input {
    padding: 0.4rem;
    margin: 0 0.5rem;
}

/* Table styling */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    text-align: left;
}

.data-table th {
    background: var(--background-light);
    font-weight: bold;
}

.inactive-event {
    background: #f1f5f9;
    color: var(--text-secondary);
}

/* td[contenteditable] {
    background: #fffcdf;
    outline: 1px dashed #d4d4a4;
}

td[contenteditable]:focus {
    outline: 2px solid #facc15;
} */

td > label {
    margin-right: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

td > label input {
    margin-right: 0.25rem;
}

/* Action buttons */
.actions-btn {
    display: flex;
    gap: 0.25rem;
}

.actions-btn button {
    padding: 4px 8px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
}

.actions-btn button:nth-child(1) {
    background: #4b5563; /* Edit button */
}

.actions-btn button:nth-child(2) {
    background: #0f766e; /* Save button */
}

.actions-btn button:nth-child(3) {
    background: #e11d48; /* Delete button */
}

.actions-btn button:nth-child(4) {
    background: #2563eb; /* Reactivate button */
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: #fff;
    margin: 10vh auto;
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.close {
    float: right;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.close:hover {
    color: var(--text-primary);
}

/* Detail modal specific styles */
.detail-modal-content {
    max-width: 90%;
    width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-group {
    background-color: var(--background-light);
    padding: 15px;
    border-radius: 5px;
}

.detail-group h4 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.detail-description {
    background-color: var(--background-light);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.detail-timestamps {
    font-size: 0.9em;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

/* Make event ID links look clickable */
#eventsTable tbody td:first-child a {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

#eventsTable tbody td:first-child a:hover {
    color: var(--primary-color-dark);
}

/* Loading indicator */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#processingCircle {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-columns {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    #searchBar, #filterBar {
        flex-direction: column;
        align-items: stretch;
    }
    
    #searchBar input, #filterBar input, #filterBar select {
        margin: 0.2rem 0;
    }
}

/* Style for the alert button */
.actions-btn button[title="Create Time Alert"] {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 3px 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.actions-btn button[title="Create Time Alert"]:hover {
    background-color: #e9ecef;
    transform: scale(1.1);
}

/* After action feedback */
.alert-created-feedback {
    background-color: #d4edda;
    color: #155724;
    padding: 3px;
    border-radius: 3px;
    font-size: 0.8rem;
    animation: fadeOut 2s ease-in-out forwards;
    animation-delay: 3s;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    white-space: nowrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-right: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 3px;
}

.checkboxes-container {
    min-width: 270px;  /* Adjust as needed to fit your table */
}


/* Tab styling */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Slides tab specific styling */
.slides-card {
    background-color: #000;
    color: #fff;
}

.slides-card h2 {
    color: #fff;
    padding: 1rem;
    text-align: center;
}

.slides-table-container {
    padding: 1rem;
    max-width: 100%;
    overflow-x: auto; /* Add horizontal scroll if needed */
}

.slides-table {
    width: 1000px !important; /* Force 1000px width */
    table-layout: fixed; /* Ensure fixed layout */
    margin: 0 auto; /* Center the table */
    border-collapse: collapse;
    color: #fff;
}

.slides-table th,
.slides-table td {
    padding: 0.8rem 1rem;
    border: 1px solid #333;
}

.slides-table th {
    background-color: #222;
    text-align: left;
}

.slides-table tbody tr {
    background-color: #111;
}

.slides-table tbody tr:nth-child(even) {
    background-color: #191919;
}

.country-flag {
    height: 30px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
}

.event-time {
    text-align: center;
    font-weight: bold;
    color: #18ffb0;
}

.forecast-value {
    font-weight: bold;
}

.forecast-unit {
    color: #aaa;
    font-size: 0.9em;
    margin-left: 5px;
}

/* Column widths for better distribution */
.slides-table th:nth-child(1),
.slides-table td:nth-child(1) {
    width: 80px; /* Country column */
}

.slides-table th:nth-child(2),
.slides-table td:nth-child(2) {
    width: 650px; /* Event name column - wider for editing */
}

.slides-table th:nth-child(3),
.slides-table td:nth-child(3) {
    width: 100px; /* Time column */
}

.slides-table th:nth-child(4),
.slides-table td:nth-child(4) {
    width: 170px; /* Forecast column */
}