/* List Users Page Styles */

.controls {
    background: #f5f7fa; /* light grey similar to events page */
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.refresh-btn {
    padding: 10px 18px;
    background: #eef3f7;
    color: #2d3748;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    font-size: 0.95em;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45,55,72,0.06);
}

.users-table {
    background: #f8fbfd;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(13, 38, 59, 0.06);
    overflow: hidden;
}

.users-table-header {
    display: flex;
    background: linear-gradient(180deg, #f0f3f6 0%, #e9eef3 100%);
    color: #2d3748;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table-row {
    display: flex;
    padding: 14px 20px;
    border-bottom: 1px solid #e9edf2;
    transition: background-color 0.12s, transform 0.06s;
    align-items: center;
    cursor: pointer;
}

.users-table-row:hover {
    background-color: #ffffff;
    transform: translateX(2px);
}

.users-table-row:last-child {
    border-bottom: none;
}

.table-cell {
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-username {
    flex: 0 0 180px;
    font-weight: 600;
    color: #333;
}

.cell-email {
    flex: 1 1 200px;
    color: #666;
}

.cell-location {
    flex: 0 0 150px;
    color: #666;
    font-size: 0.9em;
}

.cell-role {
    flex: 0 0 110px;
}

.cell-joined {
    display: none;
}

.cell-actions {
    flex: 0 0 260px;
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.admin-badge {
    background: #fef3c7;
    color: #92400e;
}

.editor-badge {
    background: #d1fae5;
    color: #065f46;
}

.user-badge {
    background: #e0e7ff;
    color: #3730a3;
}

.delete-user-btn {
    padding: 5px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.delete-user-btn:hover {
    background: #c82333;
}

.no-email-text,
.no-action {
    color: #999;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    background: #f8fbfd;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(13,38,59,0.04);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 1.1em;
}

.error {
    background: #fff7f7;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(13,38,59,0.04);
}

.error-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.error-message {
    color: #c33;
    font-size: 1.2em;
}

.no-users {
    background: #f8fbfd;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(13,38,59,0.04);
}

.no-users-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.no-users-text {
    color: #666;
    font-size: 1.2em;
}

.user-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-top: 8px;
}

.badge-email {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-no-email {
    background: #fff3e0;
    color: #f57c00;
}


/* Change Role Button */
.change-role-btn {
    padding: 5px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s;
    margin-right: 5px;
}

.change-role-btn:hover {
    background: #5568d3;
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}
.modal.hidden {
    display: none;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    margin-bottom: 20px;
    color: #666;
}

.role-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.role-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.role-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.role-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
}

.role-option-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-desc {
    font-size: 0.85em;
    color: #666;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}
