/* assets/css/components.css */

/* Form Elements */
.filter-form-group {
    margin-bottom: 10px;
}
.filter-form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    color: #555;
}
.filter-form-group input[type="text"],
.filter-form-group input[type="datetime-local"],
.filter-form-group input[type="date"],
.filter-form-group select,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.filter-form-group input:focus,
.filter-form-group select:focus,
.form-group input:focus,
.form-group select:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    outline: none;
}

/* Buttons */
.filter-buttons button,
.login-button,
.save-button,
.btn-submit,
.btn-cancel,
.button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: bold;
}
.filter-buttons button:hover,
.login-button:hover,
.save-button:hover,
.btn-submit:hover,
.btn-cancel:hover,
.button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

/* Specific Button Styles */
.btn-primary { background: #3498db; }
.btn-primary:hover { background: #2980b9; }
.btn-secondary { background: #95a5a6; }
.btn-secondary:hover { background: #7f8c8d; }
.btn-info { background: #17a2b8; }
.btn-info:hover { background: #138496; }

.download-button-container a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745; /* Green */
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}
.download-button-container a:hover {
    background-color: #218838;
}

/* Table Styles */
table {
    width: 100%;
    min-width: 800px; /* Ensure minimum width for scrolling */
    border-collapse: collapse;
    background-color: #fff;
}
th, td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    text-align: left;
    font-size: 14px;
    white-space: nowrap; /* Prevent text wrapping in table cells */
}
th {
    background-color: #2c3e50;
    color: white;
    text-transform: uppercase;
    font-weight: 700;
}
tr:nth-child(even) {
    background-color: #f9f9f9;
}
tr:hover {
    background-color: #f1f1f1;
}

/* Pagination Links */
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #3498db;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.pagination a:hover {
    background-color: #3498db;
    color: white;
}
.pagination a.current-page {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: bold;
    pointer-events: none;
}
.pagination span {
    border: none;
    background: none;
    color: #777;
}

/* Column Visibility Dropdown */
.table-controls .column-visibility-dropdown {
    position: relative;
    display: inline-block;
}
.table-controls .column-visibility-dropdown button {
    background-color: #6c757d;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}
.table-controls .column-visibility-dropdown button:hover {
    background-color: #5a6268;
}
.table-controls .column-visibility-dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    padding: 10px;
    right: 0; /* Align to the right */
}
.table-controls .column-visibility-dropdown-content label {
    display: block;
    padding: 5px 0;
    font-size: 14px;
    cursor: pointer;
}
.table-controls .column-visibility-dropdown-content label:hover {
    background-color: #e2e6ea;
}
.table-controls .column-visibility-dropdown.active .column-visibility-dropdown-content {
    display: block;
}

/* Recording Buttons */
.button {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s ease;
}
.play-button {
    background-color: #007bff;
    color: white;
}
.play-button:hover {
    background-color: #0056b3;
}
.download-button {
    background-color: #6c757d;
    color: white;
}
.download-button:hover {
    background-color: #5a6268;
}
.no-file {
    color: #dc3545;
    font-style: italic;
    font-size: 0.9em;
}

/* Specific buttons for user/randomize management */
.data-table .actions a,
.data-table .actions button {
    display: inline-block;
    padding: 6px 10px;
    margin-right: 5px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}
.data-table .actions .btn-edit {
    background-color: #28a745; /* Green */
    color: white;
}
.data-table .actions .btn-edit:hover {
    background-color: #218838;
}
.data-table .actions .btn-delete {
    background-color: #dc3545; /* Red */
    color: white;
}
.data-table .actions .btn-delete:hover {
    background-color: #c82333;
}
.data-table .actions .btn-toggle-on {
    background-color: #007bff; /* Blue */
    color: white;
}
.data-table .actions .btn-toggle-on:hover {
    background-color: #0056b3;
}
.data-table .actions .btn-toggle-off {
    background-color: #6c757d; /* Gray */
    color: white;
}
.data-table .actions .btn-toggle-off:hover {
    background-color: #5a6268;
}
.status-active {
    color: #28a745; /* Green */
    font-weight: bold;
}
.status-inactive {
    color: #dc3545; /* Red */
    font-weight: bold;
}

/* Responsive Table Adjustments */
@media (max-width: 768px) {
    th, td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 12px;
    }
    table {
        min-width: 600px; /* Keep a minimum width for tables */
    }
}
